Skip to content

Commit

Permalink
避免重复赋值
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Apr 22, 2016
1 parent a8affe4 commit 36e0170
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/hankcs/hanlp/seg/Segment.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ protected void mergeNumberQuantifier(List<Vertex> termList, WordNet wordNetAll,
wordNetAll.add(line, new Vertex(sbQuantifier.toString(), new CoreDictionary.Attribute(Nature.m)));
}
sbQuantifier.append(cur.realWord);
pre.attribute = new CoreDictionary.Attribute(Nature.mq);
pre.wordID = CoreDictionary.M_WORD_ID;
iterator.remove();
// 将其从wordNet中删除
for (Vertex vertex : wordNetAll.getVertexes()[line + sbQuantifier.length()])
Expand All @@ -322,6 +320,7 @@ protected void mergeNumberQuantifier(List<Vertex> termList, WordNet wordNetAll,
{
pre.realWord = sbQuantifier.toString();
pre.word = Predefine.TAG_NUMBER;
pre.attribute = new CoreDictionary.Attribute(Nature.mq);
pre.wordID = CoreDictionary.M_WORD_ID;
sbQuantifier.setLength(0);
}
Expand Down

0 comments on commit 36e0170

Please sign in to comment.