Skip to content

Commit f2c6d40

Browse files
committed
Oops, allow an EditNode which only removes morpho features
1 parent 6e6a7d0 commit f2c6d40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/EditNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public EditNode(String nodeName, Map<String, String> attributes, String updateMo
3333
if (nodeName == null) {
3434
throw new SsurgeonParseException("Cannot make an EditNode with no nodeName");
3535
}
36-
if (attributes.size() == 0 && updateMorphoFeatures == null && removedAttributes.size() == 0) {
37-
throw new SsurgeonParseException("Cannot make an EditNode with no updated attributes, removed attributes, or updated morphological features");
36+
if (attributes.size() == 0 && updateMorphoFeatures == null && removedAttributes.size() == 0 && removedMorpho.size() == 0) {
37+
throw new SsurgeonParseException("Cannot make an EditNode with no updated attributes, removed attributes, or updated/removed morphological features");
3838
}
3939
AddDep.checkIllegalAttributes(attributes);
4040
this.nodeName = nodeName;

0 commit comments

Comments
 (0)