@@ -881,11 +881,6 @@ private UniversalEnglishGrammaticalRelations() {}
881
881
* the meaning of the NP. Also, the enumeration of lists have
882
882
* this relation to the head of the list item.
883
883
* <br>
884
- * Also, the enumeration of lists have this relation to the head of
885
- * the list item. For that, we allow the list of constituents which
886
- * have a list under them in any of the training data, as the parser
887
- * will likely not produce anything else anyway.
888
- * <br>
889
884
* PTB: PP NP X S FRAG <br>
890
885
* EWT: SQ SBARQ SINV SBAR NML VP <br>
891
886
* Craft: PRN <br>
@@ -905,9 +900,7 @@ private UniversalEnglishGrammaticalRelations() {}
905
900
// Note that the earlier tregexes are usually enough to cover those phrases, such as when
906
901
// the QP is by itself in an ADJP or NP, but sometimes it can have other siblings such
907
902
// as in the phrase "$ 100 million or more". In that case, this next expression is needed.
908
- "QP < QP=target < /^[$]$/" ,
909
- // Lists are treated as nummod in UD_English-EWT
910
- "PP|NP|X|S|FRAG|SQ|SBARQ|SINV|SBAR|NML|VP|PRN|ADJP < LST=target" );
903
+ "QP < QP=target < /^[$]$/" );
911
904
912
905
913
906
/**
@@ -1019,12 +1012,19 @@ private UniversalEnglishGrammaticalRelations() {}
1019
1012
* define this to include: interjections (oh, uh-huh, Welcome), fillers (um, ah),
1020
1013
* and discourse markers (well, like, actually, but not: you know).
1021
1014
* We also use it for emoticons.
1015
+ * <br>
1016
+ * Also, the enumeration of lists have this relation to the head of
1017
+ * the list item. For that, we allow the list of constituents which
1018
+ * have a list under them in any of the training data, as the parser
1019
+ * will likely not produce anything else anyway.
1022
1020
*/
1023
1021
public static final GrammaticalRelation DISCOURSE_ELEMENT =
1024
1022
new GrammaticalRelation (Language .UniversalEnglish , "discourse" , "discourse element" ,
1025
1023
MODIFIER , ".*" , tregexCompiler ,
1026
1024
"__ < (NFP=target [ < " + WESTERN_SMILEY + " | < " + ASIAN_SMILEY + " ] )" ,
1027
- "__ [ < INTJ=target | < (PRN=target <1 /^(?:,|-LRB-)$/ <2 INTJ [ !<3 __ | <3 /^(?:,|-RRB-)$/ ] ) ]" );
1025
+ "__ [ < INTJ=target | < (PRN=target <1 /^(?:,|-LRB-)$/ <2 INTJ [ !<3 __ | <3 /^(?:,|-RRB-)$/ ] ) ]" ,
1026
+ // Lists are treated as discourse in UD_English-EWT as of 2.14
1027
+ "PP|NP|X|S|FRAG|SQ|SBARQ|SINV|SBAR|NML|VP|PRN|ADJP < LST=target" );
1028
1028
1029
1029
1030
1030
/**
0 commit comments