public class PerceptronPOSTagger extends PerceptronTagger implements POSTagger
model| Constructor and Description |
|---|
PerceptronPOSTagger()
加载配置文件指定的模型
|
PerceptronPOSTagger(LinearModel model) |
PerceptronPOSTagger(String modelPath) |
| Modifier and Type | Method and Description |
|---|---|
protected Instance |
createInstance(Sentence sentence,
FeatureMap featureMap) |
boolean |
learn(String... wordTags)
在线学习
|
boolean |
learn(String segmentedTaggedSentence)
在线学习
|
String[] |
tag(List<String> wordList)
标注
|
String[] |
tag(POSInstance instance) |
String[] |
tag(String... words)
标注
|
evaluate, getModel, learn, learnevaluate, evaluate, normalizepublic PerceptronPOSTagger(LinearModel model)
public PerceptronPOSTagger(String modelPath) throws IOException
IOExceptionpublic PerceptronPOSTagger()
throws IOException
IOExceptionpublic String[] tag(POSInstance instance)
public boolean learn(String segmentedTaggedSentence)
segmentedTaggedSentence - 人民日报2014格式的句子public boolean learn(String... wordTags)
wordTags - [单词]/[词性]数组protected Instance createInstance(Sentence sentence, FeatureMap featureMap)
createInstance in class InstanceConsumerCopyright © 2014–2021 码农场. All rights reserved.