|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.suggest.scorer.BaseScorer<T>
T - 这是储存器map中key的类型,具有相同key的句子会存入同一个entrypublic abstract class BaseScorer<T extends ISentenceKey>
基本打分器
| 字段摘要 | |
|---|---|
double |
boost
权重 |
protected Map<T,Set<String>> |
storage
储存 |
| 构造方法摘要 | |
|---|---|
BaseScorer()
|
|
| 方法摘要 | |
|---|---|
void |
addSentence(String sentence)
输入一个候选句子 |
Map<String,Double> |
computeScore(String outerSentence)
计算分值 |
protected abstract T |
generateKey(String sentence)
生成能够代表这个句子的键 |
void |
removeAllSentences()
清空该推荐器中的所有句子 |
BaseScorer |
setBoost(double boost)
设置权重 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected Map<T extends ISentenceKey,Set<String>> storage
public double boost
| 构造方法详细信息 |
|---|
public BaseScorer()
| 方法详细信息 |
|---|
public BaseScorer setBoost(double boost)
boost -
public void addSentence(String sentence)
IScorer 复制的描述
IScorer 中的 addSentenceprotected abstract T generateKey(String sentence)
sentence -
public Map<String,Double> computeScore(String outerSentence)
IScorer 复制的描述
IScorer 中的 computeScoreouterSentence - 外部句子
public void removeAllSentences()
IScorer 复制的描述
IScorer 中的 removeAllSentences
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||