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, Executable, FeatureBearer, Gazetteer, LanguageAnalyser, NameBearer, OntoGazetteer, ProcessingResource, Resource, 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, DOCUMENT_COREF_FEATURE_NAME, 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 |
private void |
checkParameters()
Checks the parameters set to this gazetteer |
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, reInit, setAnnotationSetName, setCaseSensitive, setEncoding, setFeatures, setListsURL, setMappingDefinition |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, 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
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Parameters:
singleItem
- the string- Returns:
- set of Lookups
init
public Resource init()
throws ResourceInstantiationException
- Initialize this onto gazetteer
- Overrides:
init
in class AbstractProcessingResource
- Returns:
- .
execute
public void execute()
throws ExecutionException
- Executes this onto gazetteer over a pre-set document
- Overrides:
execute
in class AbstractProcessingResource
- Throws:
ExecutionException
- if something goes wrong with the execution
checkParameters
private void checkParameters()
throws ResourceInstantiationException
- Checks the parameters set to this gazetteer
- Throws:
ResourceInstantiationException
- if something goes wrong
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.