org.ansj.app.phrase.Occurrence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ansj_seg Show documentation
Show all versions of ansj_seg Show documentation
best java chinese word seg !
The newest version!
package org.ansj.app.phrase;
import org.ansj.domain.Term;
import org.nlpcn.commons.lang.util.MapCount;
import java.util.List;
public class Occurrence {
/**
* 左邻项
*/
private MapCount leftTerms = new MapCount();
/**
* 右邻项
*/
private MapCount rightTerms = new MapCount();
private List terms;
private int frequency;
private double pmi;
private double leftEntropy;
private double rightEntropy;
private double score;
public Occurrence(List terms) {
this.terms = terms;
}
public MapCount getLeftTerms() {
return leftTerms;
}
public void addLeftTerm(String term) {
this.leftTerms.add(term);
}
public MapCount getRightTerms() {
return rightTerms;
}
public void addRightTerm(String term) {
this.rightTerms.add(term);
}
public List getTerms() {
return terms;
}
public int getFrequency() {
return frequency;
}
public void increaseFrequency() {
++this.frequency;
}
public double getPmi() {
return pmi;
}
public void setPmi(double pmi) {
this.pmi = pmi;
}
public double getLeftEntropy() {
return leftEntropy;
}
public void setLeftEntropy(double leftEntropy) {
this.leftEntropy = leftEntropy;
}
public double getRightEntropy() {
return rightEntropy;
}
public void setRightEntropy(double rightEntropy) {
this.rightEntropy = rightEntropy;
}
public double getScore() {
return score;
}
public void setScore(double score) {
this.score = score;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy