@@ -57,12 +57,20 @@ public static void load() {
57
57
// Context-sensitive mappings
58
58
// ------------------------------
59
59
60
- String [][] contextMappings = new String [][] {
60
+ String [][] toContextMappings = new String [][] {
61
61
// TO -> PART (in CONJP phrases)
62
62
{ "@CONJP < TO=target < VB" , "PART" , },
63
63
{ "@VP < @VP < (/^TO$/=target <... {/.*/})" , "PART" , },
64
64
{ "@VP <: (/^TO$/=target <... {/.*/})" , "PART" , },
65
65
{ "TO=target <... {/.*/}" , "ADP" , }, // otherwise TO -> ADP
66
+ };
67
+ for (String [] newOp : toContextMappings ) {
68
+ operations .add (new Pair <>(TregexPattern .compile (newOp [0 ]),
69
+ Tsurgeon .parseOperation ("relabel target " + newOp [1 ])));
70
+
71
+ }
72
+
73
+ String [][] otherContextMappings = new String [][] {
66
74
// Don't do this, we are now treating these as copular constructions
67
75
// VB.* -> AUX (for passives where main verb is part of an ADJP)
68
76
// @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 ] )
@@ -134,7 +142,7 @@ public static void load() {
134
142
// WDT -> DET
135
143
{ "WDT=target <... {/.*/}" , "DET" },
136
144
};
137
- for (String [] newOp : contextMappings ) {
145
+ for (String [] newOp : otherContextMappings ) {
138
146
operations .add (new Pair <>(TregexPattern .compile (newOp [0 ]),
139
147
Tsurgeon .parseOperation ("relabel target " + newOp [1 ])));
140
148
0 commit comments