2016-08-24 4 views
2

Im taging HyphenizationWord Wie off-line, New-Liste, VBSE-in..etc mitUIMA Ruta Inkonsistenz Wort

(SW|CW|CAP) HYPHEN (SW|CW|CAP) HYPHEN (SW|CW|CAP) {-PARTOF(HyphenizationWord) ->MARK(ThreeHyphenizationWord,1,5)}; 
(SW|CW|CAP) HYPHEN (SW|CW|CAP) {-PARTOF(HyphenizationWord),-PARTOF(ThreeHyphenizationWord) ->MARK(HyphenizationWord,1,3),MARK(PreHyphenizationWords,1),MARK(PosHyphenixationWords,3)}; 

und ich will immer Worte wie Linie markieren, New list..etc. Aber mein Skript falsch einige Worte LIke..off in, VBSE Zeile.

DECLARE ComplexPreWord,ComplexPostWord; 
//BLOCK (foreach) HyphenizationWord{} 
//{ 
STRING PreWord; 
STRINGLIST PreWordList; 
PreHyphenizationWords{- >MATCHEDTEXT(PreWord),ADD(PreWordList,PreWord)}; 
W {INLIST(PreWordList)->ComplexPreWord}; 

STRING PostWord; 
STRINGLIST PostWordList; 
PosHyphenixationWords{- >MATCHEDTEXT(PostWord),ADD(PostWordList,PostWord)}; 
W {INLIST(PostWordList)->ComplexPostWord}; 
//} 

ComplexPreWord ComplexPostWord{->MARK(ComplexWord,1,2)}; 

Es gibt einen Weg, mein Problem zu lösen ..

Antwort

2

Ich weiß nicht, ob ich Ihre Frage richtig verstanden, aber vielleicht ist es das, was Sie wollen:

DECLARE Hyphen; 
SPECIAL.ct == "-"{-> Hyphen}; 

DECLARE HyphenizationWord, PreHyphenizationWords, PosHyphenixationWords; 
DECLARE HyphenizationWord ThreeHyphenizationWord; 

(W @Hyphen{-PARTOF(HyphenizationWord)} W Hyphen W){-> ThreeHyphenizationWord}; 
(W{-> PreHyphenizationWords} @Hyphen{-PARTOF(HyphenizationWord)} W{-> PosHyphenixationWords}){-> HyphenizationWord}; 

STRINGLIST hyphenizationWordList; 
STRING mt; 
HyphenizationWord{-> MATCHEDTEXT(mt), ADD(hyphenizationWordList, replaceAll(mt, "[- ]", ""))}; 

DECLARE ComplexWord; 
MARKFAST(ComplexWord,hyphenizationWordList); 

Das Skript beginnt mit deinen Regeln (umgeschrieben). Anschließend wird der bearbeitete Text der HyphenizationWord-Annotation in einer Liste gespeichert, die Bindestriche und Leerzeichen werden jedoch zuvor entfernt. Dann wird diese Liste einfach in einer Wörterbuchsuche mit MARKFAST verwendet.

HAFTUNGSAUSSCHLUSS: Ich bin ein Entwickler von UIMA Ruta

Verwandte Themen