@@ -57,82 +57,82 @@ public static void load() {
57
57
// Context-sensitive mappings
58
58
// ------------------------------
59
59
60
- // TO -> PART (in CONJP phrases)
61
60
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",
70
70
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" , },
77
77
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" , },
84
84
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" },
87
87
88
- // otherwise, VB.* -> VERB
89
- { "/^VB.*/=target <... {/.*/}" , "VERB" , },
88
+ // otherwise, VB.* -> VERB
89
+ { "/^VB.*/=target <... {/.*/}" , "VERB" , },
90
90
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" , },
93
93
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" },
96
96
97
- // IN -> ADP (otherwise)
98
- { "IN=target < __" , "ADP" },
97
+ // IN -> ADP (otherwise)
98
+ { "IN=target < __" , "ADP" },
99
99
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" },
102
102
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" },
106
106
107
- // NN -> NOUN (otherwise)
108
- { "NN=target <... {/.*/}" , "NOUN" },
107
+ // NN -> NOUN (otherwise)
108
+ { "NN=target <... {/.*/}" , "NOUN" },
109
109
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" , },
112
112
113
- // NFP -> SYM (otherwise)
114
- { "NFP=target <... {/.*/}" , "SYM" },
113
+ // NFP -> SYM (otherwise)
114
+ { "NFP=target <... {/.*/}" , "SYM" },
115
115
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" },
118
118
119
- // Otherwise RB -> ADV
120
- { "RB=target <... {/.*/}" , "ADV" },
119
+ // Otherwise RB -> ADV
120
+ { "RB=target <... {/.*/}" , "ADV" },
121
121
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" , },
124
124
125
- // DT -> DET
126
- { "DT=target < __" , "DET" },
125
+ // DT -> DET
126
+ { "DT=target < __" , "DET" },
127
127
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" },
130
130
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" },
133
133
134
- // WDT -> DET
135
- { "WDT=target <... {/.*/}" , "DET" },
134
+ // WDT -> DET
135
+ { "WDT=target <... {/.*/}" , "DET" },
136
136
};
137
137
for (String [] newOp : contextMappings ) {
138
138
operations .add (new Pair <>(TregexPattern .compile (newOp [0 ]),
0 commit comments