public final class WordCheckerBs extends Object implements IWordCheckerBs
project: word-checker-EnWordCheckerBs
create on 2020/2/6 9:34
| 限定符和类型 | 方法和说明 |
|---|---|
WordCheckerBs |
commonSegment(com.github.houbb.nlp.common.segment.ICommonSegment commonSegment) |
String |
correct(String text)
最佳纠正结果
1.
|
List<String> |
correctList(String text)
所有匹配纠正列表
|
List<String> |
correctList(String text,
int limit)
最佳纠正列表
1. list 的大小永远不会大于 limit,大小返回应该是 [0, limit]
|
Map<String,List<String>> |
correctMap(String text)
对应的 map 信息
|
Map<String,List<String>> |
correctMap(String text,
int limit)
对应的 map 信息
|
WordCheckerBs |
enMaxEditDistance(int enMaxEditDistance) |
WordCheckerBs |
enWordData(IWordData enWordData) |
WordCheckerBs |
enWordFormat(IWordFormat enWordFormat) |
WordCheckerBs |
init()
初始化
|
boolean |
isCorrect(String text)
是否拼写正确
|
static WordCheckerBs |
newInstance()
创建新的实例
|
WordCheckerBs |
zhMaxEditDistance(int zhMaxEditDistance) |
WordCheckerBs |
zhWordData(IWordData zhWordData) |
WordCheckerBs |
zhWordFormat(IWordFormat zhWordFormat) |
public static WordCheckerBs newInstance()
public WordCheckerBs init()
public WordCheckerBs commonSegment(com.github.houbb.nlp.common.segment.ICommonSegment commonSegment)
public WordCheckerBs enWordData(IWordData enWordData)
public WordCheckerBs zhWordData(IWordData zhWordData)
public WordCheckerBs enWordFormat(IWordFormat enWordFormat)
public WordCheckerBs enMaxEditDistance(int enMaxEditDistance)
public WordCheckerBs zhMaxEditDistance(int zhMaxEditDistance)
public WordCheckerBs zhWordFormat(IWordFormat zhWordFormat)
public boolean isCorrect(String text)
IWordCheckerBsisCorrect 在接口中 IWordCheckerBstext - 原始内容true 正确拼写, false 错误拼写public String correct(String text)
IWordCheckerBscorrect 在接口中 IWordCheckerBstext - 原始内容public List<String> correctList(String text, int limit)
IWordCheckerBscorrectList 在接口中 IWordCheckerBstext - 单词limit - 限制,用于指定返回列表的大小public List<String> correctList(String text)
IWordCheckerBscorrectList 在接口中 IWordCheckerBstext - 单词public Map<String,List<String>> correctMap(String text, int limit)
text - 文本limit - 限制Copyright © 2024. All rights reserved.