gate.creole.gazetteer
Class AbstractGazetteer
java.lang.Object
|
+--gate.util.AbstractFeatureBearer
|
+--gate.creole.AbstractResource
|
+--gate.creole.AbstractProcessingResource
|
+--gate.creole.AbstractLanguageAnalyser
|
+--gate.creole.gazetteer.AbstractGazetteer
- All Implemented Interfaces:
- ANNIEConstants, Executable, FeatureBearer, Gazetteer, LanguageAnalyser, NameBearer, ProcessingResource, Resource, Serializable
- Direct Known Subclasses:
- AbstractOntoGazetteer, DefaultGazetteer
- public abstract class AbstractGazetteer
- extends AbstractLanguageAnalyser
- implements Gazetteer
AbstractGazetteer
This class implements the common-for-all methods of the Gazetteer interface
- 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 |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
AbstractGazetteer
public AbstractGazetteer()
setAnnotationSetName
public void setAnnotationSetName(String newAnnotationSetName)
- Sets the AnnotationSet that will be used at the next run for the newly
produced annotations.
- Specified by:
setAnnotationSetName
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Parameters:
newAnnotationSetName
- the annotation set name for
the annotations that are going to be produced
getAnnotationSetName
public String getAnnotationSetName()
- Gets the AnnotationSet that will be used at the next run for the newly
produced annotations.
- Specified by:
getAnnotationSetName
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Returns:
- the current AnnotationSet name
setEncoding
public void setEncoding(String newEncoding)
- Specified by:
setEncoding
in interface Gazetteer
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interface Gazetteer
getListsURL
public URL getListsURL()
- Description copied from interface:
Gazetteer
- Gets the url of the lists.def file
- Specified by:
getListsURL
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Returns:
- the url of the lists.def file
setListsURL
public void setListsURL(URL newListsURL)
- Description copied from interface:
Gazetteer
- Sets the url of the lists.def file
- Specified by:
setListsURL
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Parameters:
newListsURL
- the url of the lists.def file to be set
setCaseSensitive
public void setCaseSensitive(Boolean newCaseSensitive)
- Description copied from interface:
Gazetteer
- Triggers case sensitive
- Specified by:
setCaseSensitive
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Parameters:
newCaseSensitive
- turn on or off case sensitivity
getCaseSensitive
public Boolean getCaseSensitive()
- Description copied from interface:
Gazetteer
- Gets the current case sensitivity
- Specified by:
getCaseSensitive
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Returns:
- the current case sensitivity
setMappingDefinition
public void setMappingDefinition(MappingDefinition mapping)
- Description copied from interface:
Gazetteer
- Sets the mapping definition if such to this gazetteer
- Specified by:
setMappingDefinition
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Parameters:
mapping
- a mapping definition
getMappingDefinition
public MappingDefinition getMappingDefinition()
- Description copied from interface:
Gazetteer
- Gets the mapping definition of this gazetteer,if such
- Specified by:
getMappingDefinition
in interface Gazetteer
- Following copied from interface:
gate.creole.gazetteer.Gazetteer
- Returns:
- the mapping definition of this gazetteer,if such otherwise null
getLinearDefinition
public LinearDefinition getLinearDefinition()
- Gets the linear definition of this gazetteer. there is no parallel
set method because the definition is loaded through the listsUrl
on init().
- Specified by:
getLinearDefinition
in interface Gazetteer
- Returns:
- the linear definition of the gazetteer
getFeatures
public FeatureMap getFeatures()
- Description copied from interface:
FeatureBearer
- Get the feature set
- Specified by:
getFeatures
in interface FeatureBearer
- Overrides:
getFeatures
in class AbstractFeatureBearer
setFeatures
public void setFeatures(FeatureMap features)
- Description copied from interface:
FeatureBearer
- Set the feature set
- Specified by:
setFeatures
in interface FeatureBearer
- Overrides:
setFeatures
in class AbstractFeatureBearer
reInit
public void reInit()
throws ResourceInstantiationException
- Description copied from interface:
ProcessingResource
- Reinitialises the processing resource. After calling this method the
resource should be in the state it is after calling init.
If the resource depends on external resources (such as rules files) then
the resource will re-read those resources. If the data used to create
the resource has changed since the resource has been created then the
resource will change too after calling reInit().
- Specified by:
reInit
in interface ProcessingResource
- Overrides:
reInit
in class AbstractProcessingResource
fireGazetteerEvent
public void fireGazetteerEvent(GazetteerEvent ge)
- fires a Gazetteer Event
- Specified by:
fireGazetteerEvent
in interface Gazetteer
- Parameters:
ge
- Gazetteer Event to be fired
addGazetteerListener
public void addGazetteerListener(GazetteerListener gl)
- Registers a Gazetteer Listener
- Specified by:
addGazetteerListener
in interface Gazetteer
- Parameters:
gl
- Gazetteer Listener to be registered