public class SimpleGazetteerAnnotator extends Annotator
config, isInitialized, requiredViews, viewName| Constructor and Description |
|---|
SimpleGazetteerAnnotator()
Loads phrases of length 4 or less from gazetteers specified in default parameter
SimpleGazetteerAnnotatorConfigurator.PATH_TO_DICTIONARIES |
SimpleGazetteerAnnotator(ResourceManager nonDefaultRm)
ResourceManager can override properties in
SimpleGazetteerAnnotatorConfigurator |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(TextAnnotation ta)
The view will consist of potentially overlapping constituents representing those tokens that
matched entries in the gazetteers.
|
void |
initialize(ResourceManager rm)
init all the gazetters, read the terms from a file.
|
URL[] |
listGazetteers(String resourceDir)
Lists the contents of a directory that exists either in the local path or in the classpath
|
doInitialize, getRequiredViews, getTagValues, getView, getViewName, isInitialized, isSentenceLevelpublic SimpleGazetteerAnnotator()
throws IOException,
URISyntaxException
SimpleGazetteerAnnotatorConfigurator.PATH_TO_DICTIONARIESIOExceptionURISyntaxExceptionpublic SimpleGazetteerAnnotator(ResourceManager nonDefaultRm) throws IOException, URISyntaxException
SimpleGazetteerAnnotatorConfiguratorIOExceptionURISyntaxExceptionpublic URL[] listGazetteers(String resourceDir) throws IOException
resourceDir - The name of the directory containing the gazetteersIOExceptionpublic void initialize(ResourceManager rm)
initialize in class Annotatorrm - configuration parametersIOExceptionURISyntaxExceptionpublic void addView(TextAnnotation ta) throws AnnotatorException
addView in class Annotatorta - the TextAnnotation to modify.AnnotatorExceptionCopyright © 2017. All rights reserved.