I tried to make a disambiguation rule that uses an antipattern from DT_VB_NN. The rule should remove NN from ‘bound’ to leave the various VB readings in “The Aegean Islands are within the sea and some bound it on its southern periphery…”
Here is a simplified version of the rule:
<rule name="determiner + VB/NN -> VB" id="DT_VB_PRP"> <pattern> <token>some</token> <token postag_regexp="yes" postag="VB.*">bound</token> <token>it</token> </pattern> <disambig action="filter" postag="VB.*"/> <example type="ambiguous" inputform="bound[bind/VBD,bound/NN,bound/VB,bound/VBD]" outputform="bound[bind/VBD,bound/VB,bound/VBD]">The Aegean Islands are within the sea and some <marker>bound</marker> it on its southern periphery...</example> </rule>
I cannot get the rule to work. Maven gives this warning:
Exception in thread "main" java.lang.AssertionError: Disambiguated sentence is equal to the input sentence for rule: DT_VB_PRP. The sentence was: <S> The[the/DT,B-NP-plural] Aegean[Aegean/JJ,Aegean/NNP,I-NP-plural] Islands[island/NNS,E-NP-plural] are[be/VBP,B-VP] within[within/IN,B-PP] the[the/DT,B-NP-singular] sea[sea/JJ,sea/NN:UN,E-NP-singular] and[and/CC,O] some[some/DT,B-NP-singular|E-NP-singular] bound[bound/NN,bound/VB,bound/VBP,bind/VBD,bind/VBN,B-VP] it[it/PRP,B-NP-singular|E-NP-singular] on[on/IN,on/JJ,on/RP,B-PP] its[its/PRP$,B-NP-singular] southern[southern/JJ,southern/NN,I-NP-singular] periphery[periphery/NN,E-NP-singular].[./.,./PCT].[./.,./PCT].[./.,</S>./PCT]
Can you see what I am doing wrong?