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, isSentenceLevel
public SimpleGazetteerAnnotator() throws IOException, URISyntaxException
SimpleGazetteerAnnotatorConfigurator.PATH_TO_DICTIONARIES
IOException
URISyntaxException
public SimpleGazetteerAnnotator(ResourceManager nonDefaultRm) throws IOException, URISyntaxException
SimpleGazetteerAnnotatorConfigurator
IOException
URISyntaxException
public URL[] listGazetteers(String resourceDir) throws IOException
resourceDir
- The name of the directory containing the gazetteersIOException
public void initialize(ResourceManager rm)
initialize
in class Annotator
rm
- configuration parametersIOException
URISyntaxException
public void addView(TextAnnotation ta) throws AnnotatorException
addView
in class Annotator
ta
- the TextAnnotation to modify.AnnotatorException
Copyright © 2017. All rights reserved.