As well as the Sentence
annotations covering the sentences themselves, the sentence splitter also creates Split
annotations on the sentence boundaries. If you include Split
in your Input
line but do not mention {Split}
in a rule, this will have the effect of preventing a match that crosses a sentence boundary.
Phase: secondpass
Input: Lookup Split
Options: control = brill
Rule: A3b
({Lookup.majorType == "trouble"}
{Lookup.majorType == "alteration"}
):label
--> :label.A3b = {rule= "A3b"}
The way this works is that the Input
line determines which annotations the JAPE matcher can "see" - if the trouble and alteration Lookup
annotations are in different sentences, then the matcher will see the sequence {Lookup}{Split}{Lookup}
, which does not match a rule that wants {Lookup}{Lookup}
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…