You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/edu/stanford/nlp/semgraph/semgrex/SemgrexParser.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -122,11 +122,13 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
122
122
}
123
123
for (Stringkey : uniqKeys) {
124
124
if (!knownVariables.contains(key)) {
125
-
{if (true) thrownewSemgrexParseException("Semgrex pattern |" + startToken + "| asked for uniq of node " + key + " which does not exist in the pattern");}
125
+
{if (true) thrownewSemgrexParseException("Semgrex pattern asked for uniq of node " + key + " which does not exist in the pattern");}
126
126
}
127
127
}
128
-
// TODO: do shit here
129
-
128
+
// TODO: can error check that the keys are unique between node and edge names
129
+
// that might require keeping edge names in a known set
130
+
// TODO: edge names might need some upgrades anyway - shouldn't name them under negation, for example
131
+
node = newUniqPattern(node, uniqKeys);
130
132
break;
131
133
}
132
134
default:
@@ -535,7 +537,7 @@ final public SemgrexPattern Root() throws ParseException {// Root pattern for th
535
537
}
536
538
case17:{
537
539
jj_consume_token(17);
538
-
startUnderNeg = underNodeNegation;
540
+
startUnderNeg = underNodeNegation;// TODO: can negations be nested? If so, should they cancel?
0 commit comments