public class ServerClientAnnotator extends Annotator
config, isInitialized, requiredViews, viewName| Constructor and Description |
|---|
ServerClientAnnotator() |
ServerClientAnnotator(String viewName) |
ServerClientAnnotator(String viewName,
String[] requiredViews) |
ServerClientAnnotator(String viewName,
String url,
String port,
String[] viewsToAdd) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(TextAnnotation ta)
create and add the view named by getViewName() to the TextAnnotation argument.
|
void |
addView(TextAnnotation ta,
boolean overwrite) |
TextAnnotation |
annotate(String str) |
TextAnnotation |
annotate(String str,
boolean overwrite) |
void |
close()
MapDB requires the database to be closed at the end of operations.
|
void |
initialize(ResourceManager rm)
Derived classes use this to load memory- or time-consuming resources.
|
static void |
main(String[] args) |
void |
setUrl(String url,
String port) |
void |
setViews(String... viewsToAdd) |
void |
setViewsAll(String[] viewsToAdd) |
void |
useCaching() |
void |
useCaching(String dbFile) |
doInitialize, getRequiredViews, getTagValues, getView, getViewName, isInitialized, isSentenceLevelpublic ServerClientAnnotator()
public ServerClientAnnotator(String viewName)
public ServerClientAnnotator(String viewName, String url, String port, String[] viewsToAdd)
public void setViewsAll(String[] viewsToAdd)
public void setViews(String... viewsToAdd)
public void useCaching()
public void useCaching(String dbFile)
public void close()
closeOnJvmShutdown() snippet in the initializer, but this method needs to be
called if multiple instances of the TextAnnotationMapDBHandler are used.public void initialize(ResourceManager rm)
Annotatorinitialize in class Annotatorrm - configuration parameterspublic TextAnnotation annotate(String str) throws Exception
Exceptionpublic TextAnnotation annotate(String str, boolean overwrite) throws Exception
overwrite - if true, it would overwrite the values on cacheExceptionpublic void addView(TextAnnotation ta)
Annotatorpublic void addView(TextAnnotation ta, boolean overwrite)
public static void main(String[] args)
Copyright © 2017. All rights reserved.