Class TextRankKeyphraseExtractor
- java.lang.Object
-
- org.lionsoul.jcseg.extractor.KeyphraseExtractor
-
- org.lionsoul.jcseg.extractor.impl.TextRankKeyphraseExtractor
-
public class TextRankKeyphraseExtractor extends KeyphraseExtractor
document key phrase extractor base on textRank algorithm- Author:
- chenxin
-
-
Field Summary
Fields Modifier and Type Field Description protected intautoMinLengthauto append the words with a length over the specified value as a phrasestatic floatDprotected intkeywordsNumprotected intmaxIterateNumprotected intmaxWordsNummax phrase lengthprotected intwindowSize-
Fields inherited from class org.lionsoul.jcseg.extractor.KeyphraseExtractor
seg
-
-
Constructor Summary
Constructors Constructor Description TextRankKeyphraseExtractor(ISegment seg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAutoMinLength()List<String>getKeyphrase(Reader reader)get the keyphrase list from a readerintgetKeywordsNum()intgetMaxIterateNum()intgetMaxWordsNum()intgetWindowSize()voidsetAutoMinLength(int autoMinLength)voidsetKeywordsNum(int keywordsNum)voidsetMaxIterateNum(int maxIterateNum)voidsetMaxWordsNum(int maxPhraseLength)voidsetWindowSize(int windowSize)-
Methods inherited from class org.lionsoul.jcseg.extractor.KeyphraseExtractor
filter, getKeyphraseFromFile, getKeyphraseFromString, getSeg, setSeg
-
-
-
-
Field Detail
-
D
public static final float D
- See Also:
- Constant Field Values
-
keywordsNum
protected int keywordsNum
-
maxIterateNum
protected int maxIterateNum
-
windowSize
protected int windowSize
-
autoMinLength
protected int autoMinLength
auto append the words with a length over the specified value as a phrase
-
maxWordsNum
protected int maxWordsNum
max phrase length
-
-
Constructor Detail
-
TextRankKeyphraseExtractor
public TextRankKeyphraseExtractor(ISegment seg)
-
-
Method Detail
-
getKeyphrase
public List<String> getKeyphrase(Reader reader) throws IOException
Description copied from class:KeyphraseExtractorget the keyphrase list from a reader- Specified by:
getKeyphrasein classKeyphraseExtractor- Throws:
IOException
-
getKeywordsNum
public int getKeywordsNum()
-
setKeywordsNum
public void setKeywordsNum(int keywordsNum)
-
getMaxIterateNum
public int getMaxIterateNum()
-
setMaxIterateNum
public void setMaxIterateNum(int maxIterateNum)
-
getWindowSize
public int getWindowSize()
-
setWindowSize
public void setWindowSize(int windowSize)
-
getAutoMinLength
public int getAutoMinLength()
-
setAutoMinLength
public void setAutoMinLength(int autoMinLength)
-
getMaxWordsNum
public int getMaxWordsNum()
-
setMaxWordsNum
public void setMaxWordsNum(int maxPhraseLength)
-
-