Skip to content

Commit 5e748dc

Browse files
committed
Clarify a comment regarding the SD version of the multiple NMLs all becoming nn relations. Add the same relation to the UD version of the converter
1 parent 8e7ba0e commit 5e748dc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/edu/stanford/nlp/trees/EnglishGrammaticalRelations.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ private EnglishGrammaticalRelations() {}
10191019
new GrammaticalRelation(Language.English, "nn", "nn modifier",
10201020
MODIFIER, "(?:WH)?(?:NP|NX|NAC|NML|ADVP|ADJP)(?:-TMP|-ADV)?", tregexCompiler,
10211021
"/^(?: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))",
1022-
// same thing as the above, but without the comma. NML in such a situation is typically a noun phrase modifying a noun,
1022+
// 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,
10231023
// whereas other nodes such as NN can be parts of lists or otherwise unsuitable for the nn relationship
10241024
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NML=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$++ (POS $++ =sister))",
10251025
"/^(?: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$/) ",

src/edu/stanford/nlp/trees/UniversalEnglishGrammaticalRelations.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,10 @@ private UniversalEnglishGrammaticalRelations() {}
921921
public static final GrammaticalRelation COMPOUND_MODIFIER =
922922
new GrammaticalRelation(Language.UniversalEnglish, "compound", "compound modifier",
923923
MODIFIER, "(?:WH)?(?:NP|NX|NAC|NML|ADVP|ADJP|QP)(?:-TMP|-ADV)?", tregexCompiler,
924-
"/^(?: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))",
924+
"/^(?: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))",
925+
// 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,
926+
// whereas other nodes such as NN can be parts of lists or otherwise unsuitable for the nn relationship
927+
"/^(?:WH)?(?:NP|NX|NAC|NML)(?:-TMP|-ADV)?$/ < (NML=target $++ NN|NNS|NNP|NNPS|FW|CD=sister !<<- POS !<<- (VBZ < /^[\'’]s$/) !$++ (POS $++ =sister))",
925928
"/^(?: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$/) ",
926929
"QP|ADJP < (/^(?:CD|$|#)$/=target !$- CC)", //number relation in original SD
927930
"@NP < (/^[$]$/=target $+ /^N.*/)",

0 commit comments

Comments
 (0)