@@ -139,14 +139,21 @@ private UniversalEnglishGrammaticalRelations() {}
139
139
* <br>
140
140
* Example: <br>
141
141
* "Reagan has died" → {@code aux}(died, has)
142
+ * <br>
143
+ * For any pattern in AUX_MODIFIER, AUX_PASSIVE_MODIFIER, and COPULA
144
+ * where the target is not the verb itself, but rather the enclosing
145
+ * constituent, there is a tregex named variable:
146
+ * =aux
147
+ * Please make sure to maintain this. Those tags are used in
148
+ * UniversalPOSMapper to update the tags
142
149
*/
143
150
public static final GrammaticalRelation AUX_MODIFIER =
144
151
new GrammaticalRelation (Language .UniversalEnglish , "aux" , "auxiliary" ,
145
152
DEPENDENT , "VP|SQ|SINV|CONJP" , tregexCompiler ,
146
153
"VP < VP < (/^(?:MD|VB.*|AUXG?|POS)$/=target)" ,
147
154
"SQ|SINV < (/^(?:VB|MD|AUX)/=target $++ /^(?:VP|ADJP)/)" ,
148
155
// add handling of tricky VP fronting cases...
149
- "SINV < (VP=target < (/^(?:VB|AUX|POS)/ < " + beAuxiliaryRegex + ") $-- (VP < VBG))" );
156
+ "SINV < (VP=target < (/^(?:VB|AUX|POS)/=aux < " + beAuxiliaryRegex + ") $-- (VP < VBG))" );
150
157
151
158
152
159
/**
@@ -156,15 +163,17 @@ private UniversalEnglishGrammaticalRelations() {}
156
163
*
157
164
* Example: <br>
158
165
* "Kennedy has been killed" → {@code auxpass}(killed, been)
166
+ * <br>
167
+ * See AUX_MODIFIER for an explanation of the =aux named nodes
159
168
*/
160
169
public static final GrammaticalRelation AUX_PASSIVE_MODIFIER =
161
170
new GrammaticalRelation (Language .UniversalEnglish , "aux:pass" , "passive auxiliary" ,
162
171
AUX_MODIFIER , "VP|SQ|SINV" , tregexCompiler ,
163
172
"VP < (/^(?:VB|AUX|POS)/=target < " + passiveAuxWordRegex + " ) < (VP|ADJP [ < VBN|VBD | < (VP|ADJP < VBN|VBD) < CC ] )" ,
164
173
"SQ|SINV < (/^(?:VB|AUX|POS)/=target < " + beAuxiliaryRegex + " $++ (VP < VBD|VBN))" ,
165
174
// add handling of tricky VP fronting cases...
166
- "SINV < (VP=target < (/^(?:VB|AUX|POS)/ < " + beAuxiliaryRegex + ") $-- (VP < VBD|VBN))" ,
167
- "SINV < (VP=target < (VP < (/^(?:VB|AUX|POS)/ < " + beAuxiliaryRegex + ")) $-- (VP < VBD|VBN))" );
175
+ "SINV < (VP=target < (/^(?:VB|AUX|POS)/=aux < " + beAuxiliaryRegex + ") $-- (VP < VBD|VBN))" ,
176
+ "SINV < (VP=target < (VP < (/^(?:VB|AUX|POS)/=aux < " + beAuxiliaryRegex + ")) $-- (VP < VBD|VBN))" );
168
177
169
178
/**
170
179
* The "copula" grammatical relation. A copula is the relation between
@@ -173,6 +182,8 @@ private UniversalEnglishGrammaticalRelations() {}
173
182
* Examples: <br>
174
183
* "Bill is big" → {@code cop}(big, is) <br>
175
184
* "Bill is an honest man" → {@code cop}(man, is)
185
+ * <br>
186
+ * See AUX_MODIFIER for an explanation of the =aux named nodes
176
187
*/
177
188
public static final GrammaticalRelation COPULA =
178
189
new GrammaticalRelation (Language .UniversalEnglish , "cop" , "copula" ,
@@ -182,7 +193,7 @@ private UniversalEnglishGrammaticalRelations() {}
182
193
// matches (what, is) in "what is that" after the SQ has been flattened out of the tree
183
194
"SBARQ < (/^(?:VB|AUX)/=target < " + copularWordRegex + ") < (WHNP < WP)" ,
184
195
// "Such a great idea this was"
185
- "SINV <# (NP $++ (NP $++ (VP=target < (/^(?:VB|AUX)/ < " + copularWordRegex + "))))" );
196
+ "SINV <# (NP $++ (NP $++ (VP=target < (/^(?:VB|AUX)/=aux < " + copularWordRegex + "))))" );
186
197
187
198
/**
188
199
* The "conjunct" grammatical relation. A conjunct is the relation between
0 commit comments