2

Im taging HyphenizationWord Like off-line,New-list,VBSE-in..etc using using

(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)};

そして、私は常にオフライン、新しいリストなどの単語にタグを付けたいと思っています.. しかし、私のスクリプトは、VBSE 行の Like..off という単語に誤ってタグを付けました。

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)};

私の問題を修正する方法はあります..

4

1 に答える 1

2

あなたの質問を正しく理解したかどうかはわかりませんが、おそらくこれがあなたの望みです:

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);

スクリプトは、(書き直された) ルールから始まります。次に、HyphenizationWord 注釈のカバーされたテキストがリストに格納されますが、ダッシュとスペースは事前に削除されます。次に、このリストは MARKFAST による辞書検索で使用されます。

免責事項: 私は UIMA Ruta の開発者です

于 2016-08-25T06:31:44.207 に答える