Skip to content

Commit bf8ee06

Browse files
committed
weight was not being used in AddDep... generally not likely to matter though
1 parent 147552b commit bf8ee06

File tree

1 file changed

+5
-3
lines changed
  • src/edu/stanford/nlp/semgraph/semgrex/ssurgeon

1 file changed

+5
-3
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public AddDep(String govNodeName, GrammaticalRelation relation, Map<String, Stri
5555
this.relation = relation;
5656
this.govNodeName = govNodeName;
5757
this.position = position;
58-
this.weight = 0;
58+
this.weight = weight;
5959
}
6060

6161
/**
@@ -83,8 +83,10 @@ public String toEditString() {
8383
buf.write("\"\t");
8484
}
8585

86-
buf.write(Ssurgeon.WEIGHT_ARG);buf.write(" ");
87-
buf.write(String.valueOf(weight));
86+
if (this.weight != 0.0) {
87+
buf.write(Ssurgeon.WEIGHT_ARG);buf.write(" ");
88+
buf.write(String.valueOf(weight));
89+
}
8890
return buf.toString();
8991
}
9092

0 commit comments

Comments
 (0)