@@ -980,16 +980,10 @@ private EnglishGrammaticalRelations() {}
980
980
public static final GrammaticalRelation QUANTIFIER_MODIFIER =
981
981
new GrammaticalRelation (Language .English , "quantmod" , "quantifier modifier" ,
982
982
MODIFIER , "QP" , tregexCompiler ,
983
- // RP is because sometimes "up" in "up to ___" gets tagged RP in PTB
984
- // this is probably a mistake - generally it is tagged IN
985
- // but sometimes the tagger follows suit
986
- // there are no conflicts elsewhere in the targets of a QP,
987
- // so there should be no need to specifically check for the phrase "up to" for `up_RP`
988
- "QP < IN|RB|RBR|RBS|PDT|DT|JJ|JJR|JJS|XS|RP=target" ,
989
- // TO is for the "to" in "up to ___"
990
- // TODO: but currently not working for up_IN to_IN foo_CD, since it wants to make TO the head of IN!
991
- "(QP < (TO=target < /^(?i:to)$/) < (__=up < /^(?i:up)$/)) : (=up $++ =target)" );
992
-
983
+ // XS and XSL is to match "up to" or similar phrases
984
+ // after the QPTreeTransformer's operation
985
+ "QP < IN|RB|RBR|RBS|PDT|DT|JJ|JJR|JJS|XS|XSL|RP=target"
986
+ );
993
987
994
988
/**
995
989
* The "noun compound modifier" grammatical relation. A noun compound
@@ -1275,15 +1269,17 @@ private EnglishGrammaticalRelations() {}
1275
1269
*/
1276
1270
public static final GrammaticalRelation MULTI_WORD_EXPRESSION =
1277
1271
new GrammaticalRelation (Language .English , "mwe" , "multi-word expression" ,
1278
- MODIFIER , "PP|XS|ADVP|CONJP" , tregexCompiler ,
1272
+ MODIFIER , "PP|XS|XSL| ADVP|CONJP" , tregexCompiler ,
1279
1273
"PP|XS < (IN|TO < as|of|at|to|in) < (JJ|IN|JJR|JJS|NN=target < such|because|Because|least|instead|due|Due|addition|to)" ,
1280
1274
"ADVP < (RB|IN < well) < (IN|RB|JJS=target < as)" ,
1281
1275
// TODO: perhaps the phrase "all but" is more like "all" and should have that as the head
1282
1276
"ADVP < (DT=target < all) < (CC < but)" ,
1283
1277
"CONJP < (RB < rather|well|instead) < (RB|IN=target < as|than|of)" ,
1284
1278
"CONJP < (IN < in) < (NN|TO=target < addition|to)" ,
1285
1279
// todo: note inconsistent head finding for "rather than"!
1286
- "XS < JJR|JJS=target" // more than, fewer than, well over -- maybe change some of these?
1280
+ "XS < JJR|JJS=target" , // more than, fewer than, well over -- maybe change some of these?
1281
+ // currently only "up to"
1282
+ "XSL < __=target"
1287
1283
);
1288
1284
1289
1285
/* mihai: this block needs to be uncommented to get the KBP 2010 system to work (due to the cached sentences using old code)
0 commit comments