gate.creole.gazetteer
Class OntoGazetteerImpl
java.lang.Object
gate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractProcessingResource
gate.creole.AbstractLanguageAnalyser
gate.creole.gazetteer.AbstractGazetteer
gate.creole.gazetteer.AbstractOntoGazetteer
gate.creole.gazetteer.OntoGazetteerImpl
- All Implemented Interfaces:
- ANNIEConstants, Gazetteer, OntoGazetteer, Executable, LanguageAnalyser, ProcessingResource, Resource, FeatureBearer, NameBearer, Serializable
public class OntoGazetteerImpl
- extends AbstractOntoGazetteer
OntoGazetteerImpl
An ontology-aware gazetteer, producing additional annotations
with features [class] and [ontology].
- See Also:
- Serialized Form
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 |
Method Summary |
boolean |
add(String singleItem,
Lookup lookup)
Adds a string item to the model and associates it with a Lookup |
void |
execute()
Executes this onto gazetteer over a pre-set document |
Resource |
init()
Initialize this onto gazetteer |
Set |
lookup(String singleItem)
Looks-up a string |
boolean |
remove(String singleItem)
Removes a single string item from the gazetteer model |
Methods inherited from class gate.creole.gazetteer.AbstractGazetteer |
addGazetteerListener, fireGazetteerEvent, getAnnotationSetName, getCaseSensitive, getEncoding, getFeatures, getListsURL, getMappingDefinition, getWholeWordsOnly, reInit, setAnnotationSetName, setCaseSensitive, setEncoding, setFeatures, setListsURL, setMappingDefinition, setWholeWordsOnly |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.creole.gazetteer.Gazetteer |
addGazetteerListener, fireGazetteerEvent, getAnnotationSetName, getCaseSensitive, getEncoding, getListsURL, getMappingDefinition, setAnnotationSetName, setCaseSensitive, setEncoding, setListsURL, setMappingDefinition |
OntoGazetteerImpl
public OntoGazetteerImpl()
lookup
public Set lookup(String singleItem)
- Description copied from interface:
Gazetteer
- Looks-up a string
- Parameters:
singleItem
- the string
- Returns:
- set of Lookups
init
public Resource init()
throws ResourceInstantiationException
- Initialize this onto gazetteer
- Specified by:
init
in interface Resource
- Overrides:
init
in class AbstractProcessingResource
- Returns:
- .
- Throws:
ResourceInstantiationException
execute
public void execute()
throws ExecutionException
- Executes this onto gazetteer over a pre-set document
- Specified by:
execute
in interface Executable
- Overrides:
execute
in class AbstractProcessingResource
- Throws:
ExecutionException
- if something goes wrong with the execution
remove
public boolean remove(String singleItem)
- Removes a single string item from the gazetteer model
- Parameters:
singleItem
- removes a string item from the gazetteer model
- Returns:
- true if the string is removed from the model, otherwise - false
add
public boolean add(String singleItem,
Lookup lookup)
- Adds a string item to the model and associates it with a Lookup
- Parameters:
singleItem
- the string item to be addedlookup
- the lookup to be associated with the string item
- Returns:
- true if the item has been added, otherwise - false.