Skip to content

Commit

Permalink
权重,用于词向量分析
Browse files Browse the repository at this point in the history
  • Loading branch information
ysc committed May 21, 2015
1 parent 95d21a5 commit 387f470
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/org/apdplat/word/segmentation/Word.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class Word implements Comparable{
private int frequency;
private List<Word> synonym = null;
private List<Word> antonym = null;
//权重,用于词向量分析
private Float weight;

public Word(String text){
this.text = text;
Expand Down Expand Up @@ -122,6 +124,14 @@ public void setAntonym(List<Word> antonym) {
}
}

public Float getWeight() {
return weight;
}

public void setWeight(Float weight) {
this.weight = weight;
}

@Override
public int hashCode() {
return Objects.hashCode(this.text);
Expand Down

0 comments on commit 387f470

Please sign in to comment.