Skip to content

Commit

Permalink
Converter can compensate for an error in the parser for vmod (SD) and…
Browse files Browse the repository at this point in the history
… acl (UD) by looking for NML where there should be an NP. #1363
  • Loading branch information
AngledLuffa committed Jul 8, 2023
1 parent 5745de5 commit ad4556d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/edu/stanford/nlp/trees/EnglishGrammaticalRelations.java
Expand Up @@ -1111,8 +1111,10 @@ private EnglishGrammaticalRelations() {}
// "VP < (/^S-ADV$/=target < (VP <, VBG|VBN) )",
// they wrote asking the SEC to ...
"VP < (S=target $-- NP < (VP < TO) !$-- (/^V/ < " + xcompVerbRegex + ") )",
"/^NP(?:-[A-Z]+)?$/ < (S=target < (VP < TO) $-- NP|NN|NNP|NNS)",
"/^NP(?:-[A-Z]+)?$/ < (SBAR=target < (S < (VP < TO)) $-- NP|NN|NNP|NNS)",
// NML in the following rules is to cover some errors by the parser
// It makes no difference to PTB
"/^NP(?:-[A-Z]+)?$/ < (S=target < (VP < TO) $-- NP|NN|NNP|NNS|NML)",
"/^NP(?:-[A-Z]+)?$/ < (SBAR=target < (S < (VP < TO)) $-- NP|NN|NNP|NNS|NML)",
"SBARQ < WHNP < (S=target < (VP <1 TO))");


Expand Down
Expand Up @@ -1027,9 +1027,10 @@ private UniversalEnglishGrammaticalRelations() {}
//former pcomp
"/^(?:(?:WH)?(?:NP|NX|NML)(?:-TMP|-ADV)?)$/ < (WHPP|WHPP-TMP|PP|PP-TMP=target !< @NP|WHNP|NML !$- (@CC|CONJP $- __) < /^((?!(PP|CC|CONJP|,)).)*$/ !< (@PP <1 IN|RB|MWE|PCONJP|VBN|JJ <2 @NP)) !<- " + ETC_PAT + " !<- " + FW_ETC_PAT,


"/^NP(?:-[A-Z]+)?$/ < (S=target < (VP < TO) $-- NP|NN|NNP|NNS)",
"/^NP(?:-[A-Z]+)?$/ < (SBAR=target < (S < (VP < TO)) $-- NP|NN|NNP|NNS)");
// NML in the following rules is to cover some errors by the parser
// It makes no difference to PTB
"/^NP(?:-[A-Z]+)?$/ < (S=target < (VP < TO) $-- NP|NN|NNP|NNS|NML)",
"/^NP(?:-[A-Z]+)?$/ < (SBAR=target < (S < (VP < TO)) $-- NP|NN|NNP|NNS|NML)");
// [todo [cdm2019]: Add somthing for clause acl not acl:relcl like: (NP (NP no question) (SBAR that (S (NP some) (VP contracted (NP diseases)))))

/**
Expand Down

0 comments on commit ad4556d

Please sign in to comment.