|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractProcessingResource
gate.creole.AbstractLanguageAnalyser
gate.treetagger2.TreeTaggerBase
public abstract class TreeTaggerBase
This class is a wrapper for the language-independent POS tagger from the University of Stuttgart, Germany. It passes GATE a document and a Tree Tagger shell script. Results are stored in the document's TreeTaggerToken annotations
Nested Class Summary |
---|
Nested classes/interfaces inherited from class gate.creole.AbstractProcessingResource |
---|
gate.creole.AbstractProcessingResource.InternalStatusListener, gate.creole.AbstractProcessingResource.IntervalProgressListener |
Field Summary | |
---|---|
protected java.lang.String |
addToScriptParms
|
protected java.lang.String |
annotationSetName
|
protected boolean |
debugMode
|
protected java.lang.String |
encoding
|
protected boolean |
failOnUnmappableChar
|
protected java.lang.String |
tokenAnnotationType
|
protected java.lang.String |
treeTaggerInvocationScriptParms
|
Fields inherited from class gate.creole.AbstractLanguageAnalyser |
---|
corpus |
Fields inherited from class gate.creole.AbstractProcessingResource |
---|
interrupted |
Fields inherited from class gate.creole.AbstractResource |
---|
name |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Fields inherited from interface gate.creole.ANNIEConstants |
---|
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DATE_POSTED_ANNOTATION_TYPE, DOCUMENT_COREF_FEATURE_NAME, JOB_ID_ANNOTATION_TYPE, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_CLASS_FEATURE_NAME, LOOKUP_MAJOR_TYPE_FEATURE_NAME, LOOKUP_MINOR_TYPE_FEATURE_NAME, LOOKUP_ONTOLOGY_FEATURE_NAME, MONEY_ANNOTATION_TYPE, ORGANIZATION_ANNOTATION_TYPE, PERSON_ANNOTATION_TYPE, PERSON_GENDER_FEATURE_NAME, PR_NAMES, SENTENCE_ANNOTATION_TYPE, SPACE_TOKEN_ANNOTATION_TYPE, TOKEN_ANNOTATION_TYPE, TOKEN_CATEGORY_FEATURE_NAME, TOKEN_KIND_FEATURE_NAME, TOKEN_LENGTH_FEATURE_NAME, TOKEN_ORTH_FEATURE_NAME, TOKEN_STRING_FEATURE_NAME |
Constructor Summary | |
---|---|
TreeTaggerBase()
|
Method Summary | |
---|---|
void |
execute()
Run the TreeTagger on the current document. |
java.lang.String |
getAnnotationSetName()
Return the annotation set name used for the TreeTaggerTokens. |
java.lang.Boolean |
getDebugMode()
|
gate.Document |
getDocument()
Return the document being processed. |
java.lang.String |
getEncoding()
Get the character encoding used for the temporary files. |
java.lang.Boolean |
getFailOnUnmappableChar()
Get the flag for whether we should fail if an unmappable character is found. |
protected abstract void |
getFeatures4Tokens(java.util.ArrayList lines,
java.util.ArrayList tokens)
|
java.lang.String |
getTokenAnnotationType()
|
java.lang.String |
getTreeTaggerInvocationScriptParms()
Return the location of the TreeTagger script. |
gate.Resource |
init()
Initialize this resource. |
void |
setAnnotationSetName(java.lang.String annotationSetName)
Set the name of the annotation set to place the generated TreeTaggerToken annotations in. |
void |
setDebugMode(java.lang.Boolean value)
|
void |
setDocument(gate.Document document)
Set the document to process. |
void |
setEncoding(java.lang.String newEncoding)
Set the character encoding to use for the temporary files. |
void |
setFailOnUnmappableChar(java.lang.Boolean newValue)
Set the flag for whether we should fail if an unmappable character is found. |
void |
setTokenAnnotationType(java.lang.String type)
|
void |
setTreeTaggerInvocationScriptParms(java.lang.String treeTaggerInvocationScriptParms)
Set the location of the TreeTagger script. |
Methods inherited from class gate.creole.AbstractLanguageAnalyser |
---|
getCorpus, setCorpus |
Methods inherited from class gate.creole.AbstractProcessingResource |
---|
addProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, interrupt, isInterrupted, reInit, removeProgressListener, removeStatusListener |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.ProcessingResource |
---|
reInit |
Methods inherited from interface gate.Resource |
---|
cleanup, getParameterValue, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from interface gate.util.NameBearer |
---|
getName, setName |
Methods inherited from interface gate.Executable |
---|
interrupt, isInterrupted |
Field Detail |
---|
protected java.lang.String annotationSetName
protected java.lang.String treeTaggerInvocationScriptParms
protected java.lang.String addToScriptParms
protected java.lang.String encoding
protected boolean failOnUnmappableChar
protected java.lang.String tokenAnnotationType
protected boolean debugMode
Constructor Detail |
---|
public TreeTaggerBase()
Method Detail |
---|
public gate.Resource init() throws gate.creole.ResourceInstantiationException
init
in interface gate.Resource
init
in class gate.creole.AbstractProcessingResource
gate.creole.ResourceInstantiationException
public void execute() throws gate.creole.ExecutionException
execute
in interface gate.Executable
execute
in class gate.creole.AbstractProcessingResource
gate.creole.ExecutionException
protected abstract void getFeatures4Tokens(java.util.ArrayList lines, java.util.ArrayList tokens)
public void setDocument(gate.Document document)
setDocument
in interface gate.LanguageAnalyser
setDocument
in class gate.creole.AbstractLanguageAnalyser
public gate.Document getDocument()
getDocument
in interface gate.LanguageAnalyser
getDocument
in class gate.creole.AbstractLanguageAnalyser
public void setAnnotationSetName(java.lang.String annotationSetName)
public java.lang.String getAnnotationSetName()
public void setTreeTaggerInvocationScriptParms(java.lang.String treeTaggerInvocationScriptParms)
public java.lang.String getTreeTaggerInvocationScriptParms()
public void setEncoding(java.lang.String newEncoding)
java.nio.charset.IllegalCharsetNameException
- if the specified string is not a valid
encoding name.public java.lang.String getEncoding()
public void setFailOnUnmappableChar(java.lang.Boolean newValue)
public java.lang.Boolean getFailOnUnmappableChar()
public void setDebugMode(java.lang.Boolean value)
public java.lang.Boolean getDebugMode()
public java.lang.String getTokenAnnotationType()
public void setTokenAnnotationType(java.lang.String type)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |