public class LingpipePosTagger extends java.lang.Object implements PartOfSpeechTagger
Constructor and Description |
---|
LingpipePosTagger()
Create a PosTagger using the default model.
|
LingpipePosTagger(java.lang.String modelPath)
Create a PosTagger using the model provided
|
Modifier and Type | Method and Description |
---|---|
static com.aliasi.hmm.HmmDecoder |
configure(java.lang.String modelPath)
Configure the LingpipePosTagger
|
static com.aliasi.hmm.HmmDecoder |
configure(java.net.URL modelUrl)
Configure the LingpipePosTagger using a URL to specify the model
location
|
java.util.List<PartOfSpeechTag> |
parseSentence(java.lang.String sentence)
Parse the sentence, extracting the parts of speech for each term
|
void |
setModel(java.lang.String model)
Set the model.
|
public LingpipePosTagger()
public LingpipePosTagger(java.lang.String modelPath)
modelPath
- path to a Lingpipe hidden Markov model filepublic java.util.List<PartOfSpeechTag> parseSentence(java.lang.String sentence)
parseSentence
in interface PartOfSpeechTagger
sentence
- the sentencepublic void setModel(java.lang.String model)
setModel
in interface PartOfSpeechTagger
model
- the model for this taggerpublic static com.aliasi.hmm.HmmDecoder configure(java.lang.String modelPath) throws java.io.IOException
modelPath
- the path to the hidden Markov modeljava.io.IOException
- if there is a problem reading the model filepublic static com.aliasi.hmm.HmmDecoder configure(java.net.URL modelUrl) throws java.io.IOException
modelUrl
- the URL of the model filejava.io.IOException
- if there is a problem reading the model file