|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.hankcs.hanlp.summary.KeywordExtractor
com.hankcs.hanlp.summary.TextRankKeyword
public class TextRankKeyword
基于TextRank算法的关键字提取,适用于单文档
| 构造方法摘要 | |
|---|---|
TextRankKeyword()
|
|
| 方法摘要 | |
|---|---|
List<String> |
getKeyword(String content)
提取关键词 |
static List<String> |
getKeywordList(String document,
int size)
提取关键词 |
Map<String,Float> |
getRank(List<Term> termList)
使用已经分好的词来计算rank |
Map<String,Float> |
getTermAndRank(String content)
返回全部分词结果和对应的rank |
Map<String,Float> |
getTermAndRank(String content,
Integer size)
返回分数最高的前size个分词结果和对应的rank |
| 从类 com.hankcs.hanlp.summary.KeywordExtractor 继承的方法 |
|---|
setSegment, shouldInclude |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public TextRankKeyword()
| 方法详细信息 |
|---|
public static List<String> getKeywordList(String document,
int size)
document - 文档内容size - 希望提取几个关键词
public List<String> getKeyword(String content)
content -
public Map<String,Float> getTermAndRank(String content)
content -
public Map<String,Float> getTermAndRank(String content,
Integer size)
content - size -
public Map<String,Float> getRank(List<Term> termList)
termList -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||