@@ -57,82 +57,82 @@ public static void load() {
5757 // Context-sensitive mappings
5858 // ------------------------------
5959
60- // TO -> PART (in CONJP phrases)
6160 String [][] contextMappings = new String [][] {
62- { "@CONJP < TO=target < VB" , "PART" , },
63- { "@VP < @VP < (/^TO$/=target <... {/.*/})" , "PART" , },
64- { "@VP <: (/^TO$/=target <... {/.*/})" , "PART" , },
65- { "TO=target <... {/.*/}" , "ADP" , }, // otherwise TO -> ADP
66- // Don't do this, we are now treating these as copular constructions
67- // VB.* -> AUX (for passives where main verb is part of an ADJP)
68- // @VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase|get|got|getting|gets|gotten)$/ ) < (@ADJP [ < VBN|VBD | < (@VP|ADJP < VBN|VBD) < CC ] )
69- //relabel target AUX",
61+ // TO -> PART (in CONJP phrases)
62+ { "@CONJP < TO=target < VB" , "PART" , },
63+ { "@VP < @VP < (/^TO$/=target <... {/.*/})" , "PART" , },
64+ { "@VP <: (/^TO$/=target <... {/.*/})" , "PART" , },
65+ { "TO=target <... {/.*/}" , "ADP" , }, // otherwise TO -> ADP
66+ // Don't do this, we are now treating these as copular constructions
67+ // VB.* -> AUX (for passives where main verb is part of an ADJP)
68+ // @VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase|get|got|getting|gets|gotten)$/ ) < (@ADJP [ < VBN|VBD | < (@VP|ADJP < VBN|VBD) < CC ] )
69+ //relabel target AUX",
7070
71- // VB.* -> AUX (for cases with fronted main VPs)
72- { "@SINV < (@VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ ) $-- (@VP < VBD|VBN))" ,
73- "AUX" , },
74- // VB.* -> AUX (another, rarer case of fronted VPs)
75- { "@SINV < (@VP < (@VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ )) $-- (@VP < VBD|VBN))" ,
76- "AUX" , },
71+ // VB.* -> AUX (for cases with fronted main VPs)
72+ { "@SINV < (@VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ ) $-- (@VP < VBD|VBN))" ,
73+ "AUX" , },
74+ // VB.* -> AUX (another, rarer case of fronted VPs)
75+ { "@SINV < (@VP < (@VP < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ )) $-- (@VP < VBD|VBN))" ,
76+ "AUX" , },
7777
78- // VB.* -> AUX (passive, case 2)
79- //"%SQ|SINV < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ $++ (VP < VBD|VBN))",
80- //"%relabel target AUX",
81- // VB.* -> AUX (active, case 1)
82- { "VP < VP < (/^VB.*$/=target <: /^(?i:will|have|can|would|do|is|was|be|are|has|could|should|did|been|may|were|had|'ll|'ve|does|am|might|ca|'m|being|'s|must|'d|'re|wo|shall|get|ve|s|got|r|m|getting|having|d|re|ll|wilt|v|of|my|nt|gets|du|wud|woud|with|willl|wil|wase|shoul|shal|`s|ould|-ll|most|made|hvae|hav|cold|as|art|ai|ar|a)$/)" ,
83- "AUX" , },
78+ // VB.* -> AUX (passive, case 2)
79+ //"%SQ|SINV < (/^VB/=target < /^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/ $++ (VP < VBD|VBN))",
80+ //"%relabel target AUX",
81+ // VB.* -> AUX (active, case 1)
82+ { "VP < VP < (/^VB.*$/=target <: /^(?i:will|have|can|would|do|is|was|be|are|has|could|should|did|been|may|were|had|'ll|'ve|does|am|might|ca|'m|being|'s|must|'d|'re|wo|shall|get|ve|s|got|r|m|getting|having|d|re|ll|wilt|v|of|my|nt|gets|du|wud|woud|with|willl|wil|wase|shoul|shal|`s|ould|-ll|most|made|hvae|hav|cold|as|art|ai|ar|a)$/)" ,
83+ "AUX" , },
8484
85- // VB -> AUX (active, case 2)
86- { "@SQ|SINV < (/^VB/=target $++ /^(?:VP)/ <... {/.*/})" , "AUX" },
85+ // VB -> AUX (active, case 2)
86+ { "@SQ|SINV < (/^VB/=target $++ /^(?:VP)/ <... {/.*/})" , "AUX" },
8787
88- // otherwise, VB.* -> VERB
89- { "/^VB.*/=target <... {/.*/}" , "VERB" , },
88+ // otherwise, VB.* -> VERB
89+ { "/^VB.*/=target <... {/.*/}" , "VERB" , },
9090
91- // IN -> SCONJ (subordinating conjunctions)
92- { "/^SBAR(-[^ ]+)?$/ < (IN=target $++ @S|FRAG|SBAR|SINV <... {/.*/})" , "SCONJ" , },
91+ // IN -> SCONJ (subordinating conjunctions)
92+ { "/^SBAR(-[^ ]+)?$/ < (IN=target $++ @S|FRAG|SBAR|SINV <... {/.*/})" , "SCONJ" , },
9393
94- // IN -> SCONJ (subordinating conjunctions II)
95- { "@PP < (IN=target $+ @SBAR|S)" , "SCONJ" },
94+ // IN -> SCONJ (subordinating conjunctions II)
95+ { "@PP < (IN=target $+ @SBAR|S)" , "SCONJ" },
9696
97- // IN -> ADP (otherwise)
98- { "IN=target < __" , "ADP" },
97+ // IN -> ADP (otherwise)
98+ { "IN=target < __" , "ADP" },
9999
100- // NN -> SYM (in case of the percent sign)
101- { "NN=target <... {/[%]/}" , "SYM" },
100+ // NN -> SYM (in case of the percent sign)
101+ { "NN=target <... {/[%]/}" , "SYM" },
102102
103- // fused det-noun pronouns -> PRON
104- { "NN=target < (/^(?i:(somebody|something|someone|anybody|anything|anyone|everybody|everything|everyone|nobody|nothing))$/)" ,
105- "PRON" },
103+ // fused det-noun pronouns -> PRON
104+ { "NN=target < (/^(?i:(somebody|something|someone|anybody|anything|anyone|everybody|everything|everyone|nobody|nothing))$/)" ,
105+ "PRON" },
106106
107- // NN -> NOUN (otherwise)
108- { "NN=target <... {/.*/}" , "NOUN" },
107+ // NN -> NOUN (otherwise)
108+ { "NN=target <... {/.*/}" , "NOUN" },
109109
110- // NFP -> PUNCT (in case of possibly repeated hyphens, asterisks or tildes)
111- { "NFP=target <... {/^(~+|\\ *+|\\ -+)$/}" , "PUNCT" , },
110+ // NFP -> PUNCT (in case of possibly repeated hyphens, asterisks or tildes)
111+ { "NFP=target <... {/^(~+|\\ *+|\\ -+)$/}" , "PUNCT" , },
112112
113- // NFP -> SYM (otherwise)
114- { "NFP=target <... {/.*/}" , "SYM" },
113+ // NFP -> SYM (otherwise)
114+ { "NFP=target <... {/.*/}" , "SYM" },
115115
116- // RB -> PART when it is verbal negation (not or its reductions)
117- { "@VP|SINV|SQ|FRAG|ADVP < (RB=target < /^(?i:not|n't|nt|t|n)$/)" , "PART" },
116+ // RB -> PART when it is verbal negation (not or its reductions)
117+ { "@VP|SINV|SQ|FRAG|ADVP < (RB=target < /^(?i:not|n't|nt|t|n)$/)" , "PART" },
118118
119- // Otherwise RB -> ADV
120- { "RB=target <... {/.*/}" , "ADV" },
119+ // Otherwise RB -> ADV
120+ { "RB=target <... {/.*/}" , "ADV" },
121121
122- // DT -> PRON (pronominal this/that/these/those)
123- { "@NP <: (DT=target < /^(?i:th(is|at|ose|ese))$/)" , "PRON" , },
122+ // DT -> PRON (pronominal this/that/these/those)
123+ { "@NP <: (DT=target < /^(?i:th(is|at|ose|ese))$/)" , "PRON" , },
124124
125- // DT -> DET
126- { "DT=target < __" , "DET" },
125+ // DT -> DET
126+ { "DT=target < __" , "DET" },
127127
128- // WDT -> PRON (pronominal that/which)
129- { "@WHNP|NP <: (WDT=target < /^(?i:(that|which))$/)" , "PRON" },
128+ // WDT -> PRON (pronominal that/which)
129+ { "@WHNP|NP <: (WDT=target < /^(?i:(that|which))$/)" , "PRON" },
130130
131- // WDT->SCONJ (incorrectly tagged subordinating conjunctions)
132- { "@SBAR < (WDT=target < /^(?i:(that|which))$/)" , "SCONJ" },
131+ // WDT->SCONJ (incorrectly tagged subordinating conjunctions)
132+ { "@SBAR < (WDT=target < /^(?i:(that|which))$/)" , "SCONJ" },
133133
134- // WDT -> DET
135- { "WDT=target <... {/.*/}" , "DET" },
134+ // WDT -> DET
135+ { "WDT=target <... {/.*/}" , "DET" },
136136 };
137137 for (String [] newOp : contextMappings ) {
138138 operations .add (new Pair <>(TregexPattern .compile (newOp [0 ]),
0 commit comments