|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsg.edu.nus.comp.nlp.ims.util.APTBPOSTagger
sg.edu.nus.comp.nlp.ims.util.COpenNLPPOSTagger
public final class COpenNLPPOSTagger
opennlp POS tagger.
Field Summary |
---|
Fields inherited from class sg.edu.nus.comp.nlp.ims.util.APTBPOSTagger |
---|
POSSET, POSSTANDARD |
Constructor Summary | |
---|---|
COpenNLPPOSTagger()
constructor |
|
COpenNLPPOSTagger(opennlp.tools.ngram.Dictionary p_Dict)
constructor |
|
COpenNLPPOSTagger(opennlp.tools.ngram.Dictionary p_Dictionary,
opennlp.tools.postag.POSDictionary p_POSDict)
constructor |
|
COpenNLPPOSTagger(java.io.File p_ModelFile)
constructor |
|
COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model)
constructor |
|
COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model,
opennlp.tools.ngram.Dictionary p_Dictionary)
constructor |
|
COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model,
opennlp.tools.ngram.Dictionary p_Dictionary,
opennlp.tools.postag.POSDictionary p_POSDict)
constructor |
|
COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model,
opennlp.tools.postag.POSDictionary p_POSDict)
constructor |
|
COpenNLPPOSTagger(opennlp.tools.postag.POSDictionary p_POSDict)
constructor |
|
COpenNLPPOSTagger(java.lang.String p_ModelFile)
constructor |
Method Summary | |
---|---|
java.lang.String |
getTag(java.lang.String input)
get the tag of a tagged token |
java.lang.String |
getToken(java.lang.String input)
get the original token of a tagged token |
static void |
main(java.lang.String[] args)
pos tag a given file, which was supposed to be tokenized |
static void |
setDefaultDictionary(opennlp.tools.ngram.Dictionary p_Dict)
set default tag dictionary |
static void |
setDefaultDictionary(java.lang.String p_FileName)
set default tag dictionary |
static void |
setDefaultModel(java.io.File p_File)
set default POS tagger model |
static void |
setDefaultModel(opennlp.maxent.GISModel p_Model)
set default pos tagger model |
static void |
setDefaultModel(java.lang.String p_FileName)
set default pos tagger model |
static void |
setDefaultPOSDictionary(java.io.BufferedReader p_Reader)
set default tag dictionary |
static void |
setDefaultPOSDictionary(java.io.BufferedReader p_Reader,
boolean caseSensitive)
set default tag dictionary |
static void |
setDefaultPOSDictionary(opennlp.tools.postag.POSDictionary p_POSDict)
set default tag dictionary |
static void |
setDefaultPOSDictionary(java.lang.String p_File)
set default tag dictionary |
static void |
setDefaultPOSDictionary(java.lang.String p_FileName,
boolean caseSensitive)
set default tag dictionary |
java.lang.String |
tag(java.lang.String p_Sentence)
tag a tokenized input sentence |
Methods inherited from class sg.edu.nus.comp.nlp.ims.util.APTBPOSTagger |
---|
getShortForm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public COpenNLPPOSTagger()
public COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model)
p_Model
- opennlp pos tagger modelpublic COpenNLPPOSTagger(java.io.File p_ModelFile) throws java.io.IOException
p_ModelFile
- model file
java.io.IOException
- exception while reading modelpublic COpenNLPPOSTagger(java.lang.String p_ModelFile) throws java.io.IOException
p_ModelFile
- model file
java.io.IOException
- exception while reading modelpublic COpenNLPPOSTagger(opennlp.tools.ngram.Dictionary p_Dict)
p_Dict
- dictionarypublic COpenNLPPOSTagger(opennlp.tools.postag.POSDictionary p_POSDict)
p_POSDict
- pos dictionarypublic COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model, opennlp.tools.postag.POSDictionary p_POSDict)
p_Model
- pos tagger modelp_POSDict
- pos dictionarypublic COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model, opennlp.tools.ngram.Dictionary p_Dictionary)
p_Model
- pos tagger modelp_Dictionary
- dictionarypublic COpenNLPPOSTagger(opennlp.tools.ngram.Dictionary p_Dictionary, opennlp.tools.postag.POSDictionary p_POSDict)
p_Dictionary
- dictionaryp_POSDict
- pos dictionarypublic COpenNLPPOSTagger(opennlp.maxent.MaxentModel p_Model, opennlp.tools.ngram.Dictionary p_Dictionary, opennlp.tools.postag.POSDictionary p_POSDict)
p_Model
- pos tagger modelp_Dictionary
- dictionaryp_POSDict
- pos dictionaryMethod Detail |
---|
public static void setDefaultModel(opennlp.maxent.GISModel p_Model)
p_Model
- modelpublic static void setDefaultModel(java.io.File p_File) throws java.io.IOException
p_File
- model file
java.io.IOException
- exception while reading modelpublic static void setDefaultModel(java.lang.String p_FileName) throws java.io.IOException
p_FileName
- model file name
java.io.IOException
- exception while read modelpublic static void setDefaultDictionary(opennlp.tools.ngram.Dictionary p_Dict)
p_Dict
- dictionarypublic static void setDefaultDictionary(java.lang.String p_FileName) throws java.io.IOException
p_FileName
- dictionary name
java.io.IOException
- exception while reading dictionarypublic static void setDefaultPOSDictionary(opennlp.tools.postag.POSDictionary p_POSDict)
p_POSDict
- dictionarypublic static void setDefaultPOSDictionary(java.lang.String p_File) throws java.io.IOException
p_File
- dictionary file
java.io.IOException
- exception while reading dictionarypublic static void setDefaultPOSDictionary(java.lang.String p_FileName, boolean caseSensitive) throws java.io.IOException
p_FileName
- dictionary file namecaseSensitive
- case sensitive
java.io.IOException
- exception while read dictionarypublic static void setDefaultPOSDictionary(java.io.BufferedReader p_Reader) throws java.io.IOException
p_Reader
- dictionary reader
java.io.IOException
- exception while reading dictionarypublic static void setDefaultPOSDictionary(java.io.BufferedReader p_Reader, boolean caseSensitive) throws java.io.IOException
p_Reader
- dictionary readercaseSensitive
- case sensitive
java.io.IOException
- exception while read dictionarypublic java.lang.String tag(java.lang.String p_Sentence)
IPOSTagger
p_Sentence
- a tokenized sentence
public java.lang.String getTag(java.lang.String input)
IPOSTagger
input
- a tagged token
public java.lang.String getToken(java.lang.String input)
IPOSTagger
input
- a tagged token
public static void main(java.lang.String[] args) throws java.io.IOException
args
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |