Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/FirstNames.txt ------------------------------------------------------------------------------ svn:eol-style = native
Added: uima/ruta/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,33 @@ +Bürger +Bürger +Bürgerin +Candidat +Candidatin +Ehrenbürger +Ehrenbürgerin +Familie +Frau +Freund +Freundin +Fräulein +Herr +Herrin +Herrn +Jungfer +Junker +Kandidat +Kandidatin +Lady +Madame +Master +Meister +Miss +Mister +Mistress +Mr. +Mrs. +Ms. +Nachbar +Nachbarin +Waschfrau +Weib \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/GeneralTitles.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/IMPhrases.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/IMPhrases.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/IMPhrases.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/IMPhrases.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,4 @@ +Ich bin +Ich bin +Ich heiÃe +Mein Name ist \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/IMPhrases.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/Jobs.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/Jobs.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/Jobs.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/Jobs.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,56 @@ +Advokat +Advokat +Advokatin +Anwalt +Anwältin +Arzt +Ãrztin +Autor +Autorin +Bäcker +Bäckerin +Banquier +Bauer +Bäuerin +Beamter +Beamtin +Bürgermeister +Bürgermeisterin +Diener +Dienerin +Doctor +Doktor +Doktorin +Dr. +Förster +Gouvernante +Hirte +Hirtin +Kalkulator +Kalkulatorin +Kantor +Kapellmeister +Kaufmann +Künstler +Künstlerin +Legationssekretär +Legationssekretärin +Lehrer +Lehrerin +Maler +Malerin +Metzger +Metzgerin +Pastor +Pfarrer +Polizist +Polizistin +Professor +Professorin +Sänger +Sängerin +Schriftsteller +Schriftstellerin +Sekretär +Sekretärin +Wirt \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/Jobs.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,17 @@ +Brigadier +Brigadier +Divisionär +Fachoffizier +Fachoffizierin +General +Generalin +Hauptmann +Korpskommandant +Leutnant +Major +Marketender +Marketenderin +Oberleutnant +Oberst +Offizier +Offizierin \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/MilitaryTitles.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/NobleTitles.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/NobleTitles.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/NobleTitles.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/NobleTitles.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,65 @@ +Baron +Baron +Baronesse +Baronin +Burggraf +Burggräfin +Durchlaucht +Erbgraf +ErbgroÃherzog +ErbgroÃherzogin +Erbgräfin +Erlaucht +Erzherzog +Erzherzogin +Exzellenz +Freiherr +Freiin +Fürst +Fürstin +Graf +GroÃherzog +GroÃherzogin +Gräfin +Herzog +Herzogin +Hochgeboren +Hochwohlgeboren +Hoheit +Hoheit +Junker +Junkfrau +Kaiser +Kaiserin +Komtess +Kronprinz +Kronprinzessin +Kurfürst +Kurfürstin +Kurprinz +Kurprinzessin +König +Königin +Landgraf +Landgräfin +Majestät +Markgraf +Markgräfin +Pfalzgraf +Pfalzgräfin +Prinz +Prinzessin +Raugraf +Raugräfin +Reichsgraf +Reichsgräfin +Rheingraf +Rheingräfin +Ritter +Uradel +Waldgraf +Waldgräfin +Wildgraf +Wildgräfin +Zar +Zariza \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/NobleTitles.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/ObjectWords.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/ObjectWords.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/ObjectWords.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/ObjectWords.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,6 @@ +das +das +dasselbe +dieses +ein +jenes \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/ObjectWords.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,65 @@ +Adoptivbruder +Adoptivbruder +Adoptivmutter +Adoptivschwester +Adoptivsohn +Adoptivtochter +Adoptivvater +Bruder +Cousin +Cousine +Ehefrau +Ehemann +Enkel +Enkelkind +Enkelsohn +Enkeltochter +Gatte +Gattin +Gemahl +Gemahlin +GoÃpapa +GroÃcousin +GroÃcousine +GroÃmama +GroÃmutter +GroÃvater +Mama +Muhme +Mutter +Nichte +Oheim +Oma +Onkel +Opa +Papa +Schwager +Schwester +Schwiegermama +Schwiegermutter +Schwiegeronkel +Schwiegerpapa +Schwiegersohn +Schwiegertante +Schwiegertochter +Schwiegervater +Schwippschwager +Schwippschwägerin +Schwägerin +Sohn +Stiefmama +Stiefmutter +Stiefpapa +Stiefsohn +Stieftochter +Stiefvater +Tante +Tochter +Urenkel +Urenkelin +UrgroÃmama +UrgroÃmutter +UrgroÃpapa +UrgroÃvater +Vater +Vetter \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/RelativesTitles.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/resources/Verbs.txt URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/resources/Verbs.txt?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/resources/Verbs.txt (added) +++ uima/ruta/trunk/example-projects/GermanNovels/resources/Verbs.txt Tue Sep 30 12:14:58 2014 @@ -0,0 +1,26 @@ +antworten +antworten +beginnen +bemerken +bestätigen +denken +drängen +echoen +erwidern +erzählen +fahren +fallen +fragen +fügen +kichern +lachen +murmeln +rufen +sagen +schreien +stimmen +unterbrechen +versetzen +wenden +werfen +wiederholen \ No newline at end of file Propchange: uima/ruta/trunk/example-projects/GermanNovels/resources/Verbs.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta (added) +++ uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/DirectSpeech.ruta Tue Sep 30 12:14:58 2014 @@ -0,0 +1,10 @@ +PACKAGE uima.ruta.example; + +DECLARE DirectSpeech; + +"âº" #{-> MARK(DirectSpeech, 1, 2, 3)} "â¹"; +"»" #{-> MARK(DirectSpeech, 1, 2, 3)} "«"; +"â" #{-> MARK(DirectSpeech, 1, 2, 3)} "â"; +"â" #{-> MARK(DirectSpeech, 1, 2, 3)} "â"; +"â" #{-> MARK(DirectSpeech, 1, 2, 3)} "â"; +"â" #{-> MARK(DirectSpeech, 1, 2, 3)} "â"; \ No newline at end of file Added: uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta (added) +++ uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Main.ruta Tue Sep 30 12:14:58 2014 @@ -0,0 +1,17 @@ +PACKAGE uima.ruta.example; + +IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos; +IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM GeneratedDKProCoreTypes; + +UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter; +UIMAFIT de.tudarmstadt.ukp.dkpro.core.treetagger.TreeTaggerPosLemmaTT4J; + +SCRIPT uima.ruta.example.Name; + +Document{-CONTAINS(pos.POS)} -> { + Document{-> SETFEATURE("language", "de")}; + Document{-> EXEC(StanfordSegmenter)}; + Document{-> EXEC(TreeTaggerPosLemmaTT4J, {pos.POS})}; +}; + +Document{-> CALL(Name)}; \ No newline at end of file Added: uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta URL: http://svn.apache.org/viewvc/uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta?rev=1628416&view=auto ============================================================================== --- uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta (added) +++ uima/ruta/trunk/example-projects/GermanNovels/script/uima/ruta/example/Name.ruta Tue Sep 30 12:14:58 2014 @@ -0,0 +1,112 @@ +PACKAGE uima.ruta.example; + +IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM GeneratedDKProCoreTypes AS pos; +IMPORT de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Lemma FROM GeneratedDKProCoreTypes; + +SCRIPT uima.ruta.example.DirectSpeech; + +WORDLIST AnimalList = 'Animals.txt'; +WORDLIST FirstNameList = 'FirstNames.txt'; +WORDLIST GeneralTitleList = 'GeneralTitles.txt'; +WORDLIST PhraseList = 'IMPhrases.txt'; +WORDLIST JobList = 'Jobs.txt'; +WORDLIST MilitaryTitleList = 'MilitaryTitles.txt'; +WORDLIST NobleTitleList = 'NobleTitles.txt'; +WORDLIST ObjectWordList = 'ObjectWords.txt'; +WORDLIST RelativesTitleList = 'RelativesTitles.txt'; +WORDLIST VerbList = 'Verbs.txt'; + +STRINGLIST AddNames; +STRINGLIST FirstNames; +STRINGLIST LastNames; +STRINGLIST PersNames; +STRING Match; + +DECLARE PersName, AddName, FirstName, LastName, AnAnimal, +RelativesTitle, GeneralTitle, MilitaryTitle, NobleTitle, +Job, BodyPart, IMPhrase; + +Document{-> CALL(DirectSpeech)}; +Document{-> RETAINTYPE(SPACE)}; +Document{-> MARKFAST(AnAnimal, AnimalList)}; +Document{-> MARKFAST(FirstName, FirstNameList)}; +Document{-> MARKFAST(GeneralTitle, GeneralTitleList)}; +Document{-> MARKFAST(IMPhrase, PhraseList)}; +Document{-> MARKFAST(Job, JobList)}; +Document{-> MARKFAST(MilitaryTitle, MilitaryTitleList)}; +Document{-> MARKFAST(NobleTitle, NobleTitleList)}; +Document{-> MARKFAST(RelativesTitle, RelativesTitleList)}; +Document{-> RETAINTYPE}; + +//-------------------------------------- VORNAMEN -----------------------------------------------\\ + +// Titel, nach denen wahrscheinlich ein Vorname kommt +(RelativesTitle|AnAnimal) pos.N{-PARTOF(FirstName), -PARTOF(SPECIAL) +-> MARK(FirstName), MATCHEDTEXT(Match), ADD(FirstNames, Match)}; + +// Vornamen, die mit "s" enden speichern +FirstName{-> MATCHEDTEXT(Match), ADD(FirstNames, Match + "s")}; + +// Alle Vornamen in der Liste FirstNames markieren +pos.N{-PARTOF(FirstName), INLIST(FirstNames) -> MARK(FirstName)}; + +// Vorname + Vorname = Vorname +FirstName{-> SHIFT(FirstName, 1, 2)} FirstName{-> UNMARK(FirstName)}; + + +//-------------------------------------- NACHNAMEN ----------------------------------------------\\ + +// Vornamen + CW (-> Nachname) +CW{INLIST(FirstNameList)} "von"? CW{-PARTOF(FirstName), -PARTOF(LastName), -PARTOF(pos.PP) +-> MARK(LastName, 2, 3), MATCHEDTEXT(Match), ADD(LastNames, Match)}; + +// Titel, nach denen wahrscheinlich ein Nachname kommt +(GeneralTitle|MilitaryTitle|NobleTitle|Job) "von"? CW{-PARTOF(GeneralTitle), -PARTOF(Job), +-PARTOF(NobleTitle), -PARTOF(MilitaryTitle), -PARTOF(RelativesTitle), -PARTOF(FirstName), +-PARTOF(LastName) -> MARK(LastName, 2, 3), MATCHEDTEXT(Match), ADD(LastNames, Match)}; + +// Nachnamen, die mit "s" enden speichern +LastName{-> MATCHEDTEXT(Match), ADD(LastNames, Match + "s")}; + +// Markieren der Namen in LastName +pos.N{-PARTOF(FirstName), -PARTOF(LastName), INLIST(LastNames) -> MARK(LastName)}; + + +//-------------------------------------- ADDNAMEN -----------------------------------------------\\ + +// Verschiedene Titel zusammenfassen +(AnAnimal|RelativesTitle|GeneralTitle|MilitaryTitle|NobleTitle|Job) +{-> MARK(AddName), MATCHEDTEXT(Match), ADD(AddNames, Match)}; + +// Alle Zusatztitel in der Liste AddNames markieren +pos.N{-PARTOF(AddName), INLIST(AddNames, Lemma.value) -> MARK(AddName)}; + + +//-------------------------------------- PERSONEN -----------------------------------------------\\ + +// AddName + FirstName + LastName = PersName +(AddName* @FirstName LastName*){-PARTOF(PersName) -> MARK(PersName)}; +(AddName* FirstName? @LastName){-PARTOF(PersName) -> MARK(PersName)}; + +// Sprecher nach direkter Rede als Person markieren +DirectSpeech COMMA? pos.V{INLIST(VerbList, Lemma.value)} pos.ART? CW+{-PARTOF(PersName) +-> MARK(PersName), MATCHEDTEXT(Match), ADD(PersNames, Match)}; + +// Alle Personen in der Liste PersNames markieren +pos.N{-PARTOF(PersName), INLIST(PersNames, Lemma.value) -> MARK(PersName)}; + + +//-------------------------------------- KORREKTUR ----------------------------------------------\\ + +// Eigennamen, die nicht als Vornamen oder Nachnamen erkannt wurden +Document{-> CLEAR(FirstNames)}; +DirectSpeech COMMA? pos.V{INLIST(VerbList, Lemma.value)} CW+{-PARTOF(FirstName), -PARTOF(LastName), +-PARTOF(AddName) -> MARK(FirstName), MATCHEDTEXT(Match), ADD(FirstNames, Match)}; + +// Eindeutige Phrasen nach denen ein Name kommt +IMPhrase CW{-PARTOF(FirstName) -> MARK(FirstName), MATCHEDTEXT(Match), +ADD(FirstNames, Match, Match + "s")}; + +// Alle Vornamen in der Liste FirstNames markieren +pos.N{-PARTOF(FirstName), INLIST(FirstNames) -> MARK(FirstName)}; +FirstName{-PARTOF(PersName) -> MARK(PersName)}; \ No newline at end of file