public class PartialMatchingGazetteer
extends gate.creole.gazetteer.DefaultGazetteer
| Modifier and Type | Field and Description |
|---|---|
protected String |
gazetteerFeatureSeparator
The separator used for gazetteer entry features
|
protected Map |
listsByNode
a map of nodes vs gazetteer lists
|
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, initialStateannotationSetName, caseSensitive, definition, encoding, listeners, listsURL, longestMatchOnly, mappingDefinition, wholeWordsOnlyANNOTATION_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, 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| Constructor and Description |
|---|
PartialMatchingGazetteer()
Build a gazetteer using the default lists from the gate resources
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String singleItem,
gate.creole.gazetteer.Lookup lookup) |
void |
addLookup(String text,
gate.creole.gazetteer.Lookup lookup)
Adds one phrase to the list of phrases recognized by this gazetteer
|
void |
execute()
This method runs the gazetteer.
|
Boolean |
getAvoidOverlapingAnnotations() |
String |
getGazetteerFeatureSeparator() |
Double |
getNormalizedDistanceThreshold() |
gate.Resource |
init()
Does the actual loading and parsing of the lists.
|
Set |
lookup(String singleItem)
lookup
|
protected void |
readList(gate.creole.gazetteer.LinearNode node,
boolean add)
Reads one lists (one file) of phrases
|
boolean |
remove(String singleItem) |
void |
removeLookup(String text,
gate.creole.gazetteer.Lookup lookup)
Removes one phrase to the list of phrases recognized by this gazetteer
|
void |
setAvoidOverlapingAnnotations(Boolean avoid) |
void |
setGazetteerFeatureSeparator(String gazetteerFeatureSeparator) |
void |
setNormalizedDistanceThreshold(Double threshold) |
createLookups, duplicate, getFSMgml, isWordInternaladdGazetteerListener, fireGazetteerEvent, getAnnotationSetName, getCaseSensitive, getEncoding, getLinearDefinition, getListsURL, getLongestMatchOnly, getMappingDefinition, getWholeWordsOnly, reInit, setAnnotationSetName, setCaseSensitive, setEncoding, setListsURL, setLongestMatchOnly, setMappingDefinition, setWholeWordsOnlygetCorpus, getDocument, setCorpus, setDocumentaddProgressListener, addStatusListener, cleanup, fireProcessFinished, fireProgressChanged, fireStatusChanged, getRuntimeParameterValues, getRuntimeParameterValues, interrupt, isInterrupted, removeProgressListener, removeStatusListenercheckParameterValues, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCorpus, getDocument, setCorpus, setDocumentprotected Map listsByNode
protected String gazetteerFeatureSeparator
public PartialMatchingGazetteer()
public void setAvoidOverlapingAnnotations(Boolean avoid)
public Boolean getAvoidOverlapingAnnotations()
public void setNormalizedDistanceThreshold(Double threshold)
public Double getNormalizedDistanceThreshold()
public gate.Resource init()
throws gate.creole.ResourceInstantiationException
init in interface gate.Resourceinit in class gate.creole.gazetteer.DefaultGazetteergate.creole.ResourceInstantiationExceptionprotected void readList(gate.creole.gazetteer.LinearNode node,
boolean add)
throws gate.creole.ResourceInstantiationException
readList in class gate.creole.gazetteer.DefaultGazetteernode - the nodeadd - if true will add the phrases found in the list to the ones
recognized by this gazetteer, if false the phrases found in the
list will be removed from the list of phrases recognized by this
gazetteer.gate.creole.ResourceInstantiationExceptionpublic String getGazetteerFeatureSeparator()
getGazetteerFeatureSeparator in class gate.creole.gazetteer.DefaultGazetteerpublic void setGazetteerFeatureSeparator(String gazetteerFeatureSeparator)
setGazetteerFeatureSeparator in class gate.creole.gazetteer.DefaultGazetteergazetteerFeatureSeparator - the gazetteerFeatureSeparator to setpublic void addLookup(String text, gate.creole.gazetteer.Lookup lookup)
addLookup in class gate.creole.gazetteer.DefaultGazetteertext - the phrase to be addedlookup - the description of the annotation associated to this phrasepublic void removeLookup(String text, gate.creole.gazetteer.Lookup lookup)
removeLookup in class gate.creole.gazetteer.DefaultGazetteertext - the phrase to be removedlookup - the description of the annotation associated to this phrasepublic void execute()
throws gate.creole.ExecutionException
execute in interface gate.Executableexecute in class gate.creole.gazetteer.DefaultGazetteergate.creole.ExecutionExceptionpublic Set lookup(String singleItem)
lookup in interface gate.creole.gazetteer.Gazetteerlookup in class gate.creole.gazetteer.DefaultGazetteersingleItem - a single string to be looked up by the gazetteerpublic boolean remove(String singleItem)
remove in interface gate.creole.gazetteer.Gazetteerremove in class gate.creole.gazetteer.DefaultGazetteerpublic boolean add(String singleItem, gate.creole.gazetteer.Lookup lookup)
add in interface gate.creole.gazetteer.Gazetteeradd in class gate.creole.gazetteer.DefaultGazetteerCopyright © 2016. All rights reserved.