|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.corpus.occurrence.Occurrence
public class Occurrence
词共现统计,最多统计到三阶共现
| 字段摘要 | |
|---|---|
static char |
RIGHT
两个词的正向连接符 中国 RIGHT 人民 |
| 构造方法摘要 | |
|---|---|
Occurrence()
|
|
| 方法摘要 | |
|---|---|
void |
addAll(List<Term> resultList)
|
void |
addAll(String text)
|
void |
addAll(String[] termList)
|
void |
addPair(String first,
String second)
添加一个共现 |
void |
addTerm(String key)
统计词频 |
void |
addTria(String first,
String second,
String third)
|
void |
compute()
输入数据完毕,执行计算 |
double |
computeLeftEntropy(PairFrequency pair)
计算左熵 |
double |
computeMutualInformation(PairFrequency pair)
|
double |
computeMutualInformation(String first,
String second)
|
double |
computeRightEntropy(PairFrequency pair)
计算右熵 |
int |
getPairFrequency(String first,
String second)
|
List<PairFrequency> |
getPhraseByLe()
|
List<PairFrequency> |
getPhraseByMi()
|
List<PairFrequency> |
getPhraseByRe()
|
List<PairFrequency> |
getPhraseByScore()
|
int |
getTermFrequency(String term)
获取词频 |
String |
toString()
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public static final char RIGHT
| 构造方法详细信息 |
|---|
public Occurrence()
| 方法详细信息 |
|---|
public void addPair(String first,
String second)
first - 第一个词second - 第二个词public void addTerm(String key)
key - 增加一个词
public void addTria(String first,
String second,
String third)
public int getTermFrequency(String term)
term -
public int getPairFrequency(String first,
String second)
public void addAll(String[] termList)
public List<PairFrequency> getPhraseByMi()
public List<PairFrequency> getPhraseByLe()
public List<PairFrequency> getPhraseByRe()
public List<PairFrequency> getPhraseByScore()
public void addAll(List<Term> resultList)
public void addAll(String text)
public String toString()
Object 中的 toString
public double computeMutualInformation(String first,
String second)
public double computeMutualInformation(PairFrequency pair)
public double computeLeftEntropy(PairFrequency pair)
pair -
public double computeRightEntropy(PairFrequency pair)
pair -
public void compute()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||