public class PerceptronNERecognizer extends PerceptronTagger implements NERecognizer
model| Constructor and Description |
|---|
PerceptronNERecognizer()
加载配置文件指定的模型
|
PerceptronNERecognizer(LinearModel nerModel) |
PerceptronNERecognizer(String nerModelPath) |
| Modifier and Type | Method and Description |
|---|---|
protected Instance |
createInstance(Sentence sentence,
FeatureMap featureMap) |
NERTagSet |
getNERTagSet() |
boolean |
learn(String segmentedTaggedNERSentence)
在线学习
|
String[] |
recognize(NERInstance instance) |
String[] |
recognize(String[] wordArray,
String[] posArray)
命名实体识别
|
evaluate, getModel, learn, learnevaluate, evaluate, normalizepublic PerceptronNERecognizer(LinearModel nerModel)
public PerceptronNERecognizer(String nerModelPath) throws IOException
IOExceptionpublic PerceptronNERecognizer()
throws IOException
IOExceptionpublic String[] recognize(String[] wordArray, String[] posArray)
NERecognizerrecognize in interface NERecognizerwordArray - 单词posArray - 词性public String[] recognize(NERInstance instance)
public NERTagSet getNERTagSet()
getNERTagSet in interface NERecognizerpublic boolean learn(String segmentedTaggedNERSentence)
segmentedTaggedNERSentence - 人民日报2014格式的句子protected Instance createInstance(Sentence sentence, FeatureMap featureMap)
createInstance in class InstanceConsumerCopyright © 2014–2021 码农场. All rights reserved.