Skip to content

Commit

Permalink
Clarify a comment regarding the SD version of the multiple NMLs all b…
Browse files Browse the repository at this point in the history
…ecoming nn relations. Add the same relation to the UD version of the converter
  • Loading branch information
AngledLuffa committed Aug 8, 2023
1 parent 8e7ba0e commit 5e748dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ private EnglishGrammaticalRelations() {}
new GrammaticalRelation(Language.English, "nn", "nn modifier",
MODIFIER, "(?:WH)?(?:NP|NX|NAC|NML|ADVP|ADJP)(?:-TMP|-ADV)?", tregexCompiler,
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NP|NN|NNS|NNP|NNPS|FW|AFX=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$- /^,$/ !$++ (POS $++ =sister))",
// same thing as the above, but without the comma. NML in such a situation is typically a noun phrase modifying a noun,
// same thing as the above, but without the clause excluding the comma. NML in such a situation is typically a noun phrase modifying a noun,
// whereas other nodes such as NN can be parts of lists or otherwise unsuitable for the nn relationship
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NML=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$++ (POS $++ =sister))",
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < JJ|JJR|JJS=sister < (NP|NML|NN|NNS|NNP|NNPS|FW=target !<<- POS !<<- (VBZ < /^[\'’]s$/) $+ =sister) <# NN|NNS|NNP|NNPS !<<- POS !<<- (VBZ < /^[\'’]s$/) ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,10 @@ private UniversalEnglishGrammaticalRelations() {}
public static final GrammaticalRelation COMPOUND_MODIFIER =
new GrammaticalRelation(Language.UniversalEnglish, "compound", "compound modifier",
MODIFIER, "(?:WH)?(?:NP|NX|NAC|NML|ADVP|ADJP|QP)(?:-TMP|-ADV)?", tregexCompiler,
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NP|NML|NN|NNS|NNP|NNPS|FW|AFX=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$- /^,$/ !$++ (POS $++ =sister))",
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NP|NN|NNS|NNP|NNPS|FW|AFX=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$- /^,$/ !$++ (POS $++ =sister))",
// same thing as the above, but without the clause excluding the comma. NML in such a situation is typically a noun phrase modifying a noun,
// whereas other nodes such as NN can be parts of lists or otherwise unsuitable for the nn relationship
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NML=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$++ (POS $++ =sister))",
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < JJ|JJR|JJS=sister < (NP|NML|NN|NNS|NNP|NNPS|FW=target !<<- POS !<<- (VBZ < /^[\'’]s$/) $+ =sister) <# NN|NNS|NNP|NNPS !<<- POS !<<- (VBZ < /^[\'’]s$/) ",
"QP|ADJP < (/^(?:CD|$|#)$/=target !$- CC)", //number relation in original SD
"@NP < (/^[$]$/=target $+ /^N.*/)",
Expand Down

0 comments on commit 5e748dc

Please sign in to comment.