public class CRFNERecognizer extends CRFTagger implements NERecognizer
| Constructor and Description |
|---|
CRFNERecognizer() |
CRFNERecognizer(String modelPath) |
CRFNERecognizer(String modelPath,
String[] customNERTags) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDefaultNERLabels() |
void |
addNERLabels(String newNerTag) |
protected void |
convertCorpus(Sentence sentence,
BufferedWriter bw) |
protected String |
getDefaultFeatureTemplate() |
NERTagSet |
getNERTagSet() |
String[] |
recognize(String[] wordArray,
String[] posArray)
命名实体识别
|
convertCorpus, dumpTemplate, getTemplate, train, train, trainpublic NERTagSet tagSet
public CRFNERecognizer()
throws IOException
IOExceptionpublic CRFNERecognizer(String modelPath) throws IOException
IOExceptionpublic CRFNERecognizer(String modelPath, String[] customNERTags) throws IOException
IOExceptionprotected void addDefaultNERLabels()
public void addNERLabels(String newNerTag)
protected void convertCorpus(Sentence sentence, BufferedWriter bw) throws IOException
convertCorpus in class CRFTaggerIOExceptionpublic String[] recognize(String[] wordArray, String[] posArray)
NERecognizerrecognize in interface NERecognizerwordArray - 单词posArray - 词性public NERTagSet getNERTagSet()
getNERTagSet in interface NERecognizerprotected String getDefaultFeatureTemplate()
getDefaultFeatureTemplate in class CRFTaggerCopyright © 2014–2021 码农场. All rights reserved.