|
GATE Version 3.1-2270 |
|||||||||
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.creole.gazetteer.FlexibleGazetteer
public class FlexibleGazetteer
Title: Flexible Gazetteer
The Flexible Gazetteer provides users with the flexibility to choose
their own customized input and an external Gazetteer. For example,
the user might want to replace words in the text with their base
forms (which is an output of the Morphological Analyser) or to segment
a Chinese text (using the Chinese Tokeniser) before running the
Gazetteer on the Chinese text.
The Flexible Gazetteer performs lookup over a document based on the
values of an arbitrary feature of an arbitrary annotation type, by
using an externally provided gazetteer. It is important to use an
external gazetteer as this allows the use of any type of gazetteer
(e.g. an Ontological gazetteer).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class gate.creole.AbstractProcessingResource |
---|
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener |
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
FlexibleGazetteer()
Constructor |
Method Summary | |
---|---|
void |
execute()
This method runs the gazetteer. |
Document |
getDocument()
Returns the document set up by user to work on |
Gazetteer |
getGazetteerInst()
|
String |
getInputAnnotationSetName()
Returns the inputAnnotationSetName |
List |
getInputFeatureNames()
Returns the feature names that are provided by the user to use their values to replace their actual strings in the document |
String |
getOutputAnnotationSetName()
Returns the outputAnnotationSetName |
Iterator |
getTokenIterator(Document doc,
String annotationSetName)
This method takes the document and the annotationSetName and then creates a interator for the annotations available in the document under the provided annotationSetName |
Resource |
init()
Does the actual loading and parsing of the lists. |
void |
setDocument(Document doc)
Sets the document to work on |
void |
setGazetteerInst(Gazetteer gazetteerInst)
|
void |
setInputAnnotationSetName(String annName)
sets the inputAnnotationSetName |
void |
setInputFeatureNames(List inputs)
Feature names for example: Token.string, Token.root etc... |
void |
setOutputAnnotationSetName(String annName)
sets the outputAnnotationSetName |
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 |
Constructor Detail |
---|
public FlexibleGazetteer()
Method Detail |
---|
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class AbstractProcessingResource
ResourceInstantiationException
public void execute() throws ExecutionException
execute
in interface Executable
execute
in class AbstractProcessingResource
ExecutionException
public void setDocument(Document doc)
setDocument
in interface LanguageAnalyser
setDocument
in class AbstractLanguageAnalyser
doc
- public Document getDocument()
getDocument
in interface LanguageAnalyser
getDocument
in class AbstractLanguageAnalyser
Document
public void setOutputAnnotationSetName(String annName)
annName
- public String getOutputAnnotationSetName()
String
value.public void setInputAnnotationSetName(String annName)
annName
- public String getInputAnnotationSetName()
String
value.public void setInputFeatureNames(List inputs)
inputs
- public List getInputFeatureNames()
List
value.public Gazetteer getGazetteerInst()
public void setGazetteerInst(Gazetteer gazetteerInst)
public Iterator getTokenIterator(Document doc, String annotationSetName)
doc
- annotationSetName
-
Iterator
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |