public class ChineseParserImpl extends Object implements ChineseParser
CHINESE_PARSER_BEAN_NAME
Constructor and Description |
---|
ChineseParserImpl() |
Modifier and Type | Method and Description |
---|---|
AVLTree<WordDescription> |
getLetterIndex() |
void |
loadDict(InputStream inputStream,
String encode)
加载词库
|
void |
segmentWordMax(String content,
List<String> result)
对内容进行分词,最大优先
|
void |
segmentWordMax(String content,
Map<String,Integer> ret)
对内容进行分词,最大优先,此方法由于用了统计,因此效率较低
|
void |
segmentWordMax(String content,
Map<String,Integer> ret,
int mode) |
void |
segmentWordMin(String content,
List<String> result)
对内容进行分词,最小优先
|
void |
segmentWordMin(String content,
Map<String,Integer> ret)
对内容进行分词,最小优先,此方法由于用了统计,因此效率较低
|
void |
setFoundEvent(FoundEvent event)
设置找词时的事件
|
void |
setLetterIndex(AVLTree<WordDescription> letterIndex) |
public AVLTree<WordDescription> getLetterIndex()
public void setLetterIndex(AVLTree<WordDescription> letterIndex)
public void loadDict(InputStream inputStream, String encode)
ChineseParser
loadDict
in interface ChineseParser
public void segmentWordMax(String content, List<String> result)
ChineseParser
segmentWordMax
in interface ChineseParser
public void segmentWordMin(String content, List<String> result)
ChineseParser
segmentWordMin
in interface ChineseParser
public void segmentWordMax(String content, Map<String,Integer> ret)
ChineseParser
segmentWordMax
in interface ChineseParser
public void segmentWordMin(String content, Map<String,Integer> ret)
ChineseParser
segmentWordMin
in interface ChineseParser
ret
- 分的词及个数的键值对public void setFoundEvent(FoundEvent event)
ChineseParser
setFoundEvent
in interface ChineseParser
Copyright © 2006–2018 TinyGroup. All rights reserved.