Skip to content

Commit

Permalink
weight was not being used in AddDep... generally not likely to matter…
Browse files Browse the repository at this point in the history
… though
  • Loading branch information
AngledLuffa committed Jul 1, 2024
1 parent 147552b commit bf8ee06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/AddDep.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public AddDep(String govNodeName, GrammaticalRelation relation, Map<String, Stri
this.relation = relation;
this.govNodeName = govNodeName;
this.position = position;
this.weight = 0;
this.weight = weight;
}

/**
Expand Down Expand Up @@ -83,8 +83,10 @@ public String toEditString() {
buf.write("\"\t");
}

buf.write(Ssurgeon.WEIGHT_ARG);buf.write(" ");
buf.write(String.valueOf(weight));
if (this.weight != 0.0) {
buf.write(Ssurgeon.WEIGHT_ARG);buf.write(" ");
buf.write(String.valueOf(weight));
}
return buf.toString();
}

Expand Down

0 comments on commit bf8ee06

Please sign in to comment.