是的,這是在UIMA魯塔simple regex規則實現比RutaBasic。唯一的選擇是使用直接在文本上操作而不是在註釋上運行的regexp規則。你當然應該非常小心,因爲這會導致很多註釋。
一些解釋有點精簡規則:CAP->{"."->Char;};
CAP // the only rule element of the rule: match on each CAP annotation
->{// indicates that inlined rules follow that are applied in the context of the matched annotation.
"." // a regular expression matching on each character
-> Char // the "action" of the regex rule: create an annotation of the type Char for each match of the regex
;}; // end of regex rule, end of inlined rules, end of actual rule
彙總,對所有CAP註釋規則迭代,適用於每個迭代覆蓋文本正則表達式,併爲比賽的註解。
您當然也可以使用BLOCK而不是內聯規則。
免責聲明:我是UIMA Ruta的開發商