@CreoleResource(isPrivate=true, name="Sharable Gazettee") public class SharedDefaultGazetteer extends DefaultGazetteer
DefaultGazetteer
implements CustomDuplication
using
this class, so the easiest way to build multiple copies of a
DefaultGazetteer
PR that share a single FSM is to create one
in the usual way and then use Factory.duplicate(Resource)
to
copy it.
NOTE: It is (probably) impossible to use this class from within
either the Gaze user interface or from a .gapp application file. You
should only use this PR when embedding GATE within another
application and initialise it specifically. There is no reason a
DefaultGazetteer loaded via a .gapp file cannot be used to bootstrap
this PR however.DefaultGazetteer.CharMap, DefaultGazetteer.Iter
AbstractProcessingResource.InternalStatusListener, AbstractProcessingResource.IntervalProgressListener
Modifier and Type | Field and Description |
---|---|
protected DefaultGazetteer |
bootstrapGazetteer
The existing DefaultGazetteer instance whose FSM we will share.
|
static String |
SDEF_GAZ_BOOTSTRAP_GAZETTEER_PROPERTY_NAME |
DEF_GAZ_ANNOT_SET_PARAMETER_NAME, DEF_GAZ_CASE_SENSITIVE_PARAMETER_NAME, DEF_GAZ_DOCUMENT_PARAMETER_NAME, DEF_GAZ_ENCODING_PARAMETER_NAME, DEF_GAZ_FEATURE_SEPARATOR_PARAMETER_NAME, DEF_GAZ_LISTS_URL_PARAMETER_NAME, DEF_GAZ_LONGEST_MATCH_ONLY_PARAMETER_NAME, fsmStates, gazetteerFeatureSeparator, initialState, listsByNode
annotationSetName, caseSensitive, definition, encoding, listeners, listsURL, longestMatchOnly, mappingDefinition, wholeWordsOnly
corpus, document
interrupted
name
features
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DATE_POSTED_ANNOTATION_TYPE, DEFAULT_FILE, DOCUMENT_COREF_FEATURE_NAME, JOB_ID_ANNOTATION_TYPE, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_CLASS_FEATURE_NAME, LOOKUP_INSTANCE_FEATURE_NAME, LOOKUP_LANGUAGE_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, PLUGIN_DIR, 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 and Description |
---|
SharedDefaultGazetteer() |
Modifier and Type | Method and Description |
---|---|
DefaultGazetteer |
getBootstrapGazetteer() |
Resource |
init()
Copy the references to the shareable state (i.e. the FSM) from the
existing gazetteer.
|
void |
setBootstrapGazetteer(DefaultGazetteer bootstrapGazetteer) |
add, addLookup, createLookups, duplicate, execute, getFSMgml, getGazetteerFeatureSeparator, isWordInternal, lookup, readList, remove, removeLookup, setGazetteerFeatureSeparator
addGazetteerListener, fireGazetteerEvent, getAnnotationSetName, getCaseSensitive, getEncoding, getLinearDefinition, getListsURL, getLongestMatchOnly, getMappingDefinition, getWholeWordsOnly, reInit, setAnnotationSetName, setCaseSensitive, setEncoding, setListsURL, setLongestMatchOnly, setMappingDefinition, setWholeWordsOnly
getCorpus, getDocument, setCorpus, setDocument
addProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, getRuntimeParameterValues, getRuntimeParameterValues, interrupt, isInterrupted, removeProgressListener, removeStatusListener
checkParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toString
getFeatures, setFeatures
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCorpus, getDocument, setCorpus, setDocument
cleanup, getParameterValue, setParameterValue, setParameterValues
getFeatures, setFeatures
getName, setName
interrupt, isInterrupted
public static final String SDEF_GAZ_BOOTSTRAP_GAZETTEER_PROPERTY_NAME
protected DefaultGazetteer bootstrapGazetteer
public SharedDefaultGazetteer()
public Resource init() throws ResourceInstantiationException
super.init()
as to do so would cause the
lists to be reloaded.init
in interface Resource
init
in class DefaultGazetteer
ResourceInstantiationException
public DefaultGazetteer getBootstrapGazetteer()
@CreoleParameter(comment="The DefaultGazetteer that is to be used to bootstrap this shared instance") public void setBootstrapGazetteer(DefaultGazetteer bootstrapGazetteer)