org.ow2.weblab.service.gazetteer.api
Class TextAnnotator
java.lang.Object
org.ow2.weblab.service.gazetteer.api.TextAnnotator
- All Implemented Interfaces:
- org.ow2.weblab.core.services.Analyser
- Direct Known Subclasses:
- AnnotatorFromGazFullRegexp, AnnotatorFromGazMixed
public abstract class TextAnnotator
- extends java.lang.Object
- implements org.ow2.weblab.core.services.Analyser
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
|
Constructor Summary |
TextAnnotator(org.apache.commons.logging.Log logger)
|
|
Method Summary |
void |
annote(org.ow2.weblab.core.model.Text text,
int offset,
java.lang.String word,
java.lang.String className,
java.lang.String label,
boolean createAnnotation)
Create an annotation on a text based on element detected. |
org.ow2.weblab.core.services.analyser.ProcessReturn |
process(org.ow2.weblab.core.services.analyser.ProcessArgs args)
|
abstract void |
process(org.ow2.weblab.core.model.Text text)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.commons.logging.Log logger
TextAnnotator
public TextAnnotator(org.apache.commons.logging.Log logger)
process
public org.ow2.weblab.core.services.analyser.ProcessReturn process(org.ow2.weblab.core.services.analyser.ProcessArgs args)
throws org.ow2.weblab.core.services.AccessDeniedException,
org.ow2.weblab.core.services.ContentNotAvailableException,
org.ow2.weblab.core.services.InsufficientResourcesException,
org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.ServiceNotConfiguredException,
org.ow2.weblab.core.services.UnexpectedException,
org.ow2.weblab.core.services.UnsupportedRequestException
- Specified by:
process in interface org.ow2.weblab.core.services.Analyser
- Throws:
org.ow2.weblab.core.services.AccessDeniedException
org.ow2.weblab.core.services.ContentNotAvailableException
org.ow2.weblab.core.services.InsufficientResourcesException
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.ServiceNotConfiguredException
org.ow2.weblab.core.services.UnexpectedException
org.ow2.weblab.core.services.UnsupportedRequestException
annote
public void annote(org.ow2.weblab.core.model.Text text,
int offset,
java.lang.String word,
java.lang.String className,
java.lang.String label,
boolean createAnnotation)
- Create an annotation on a text based on element detected.
- Parameters:
text - : the Text unit being annotatedoffset - : the offset of the detected elementword - : the word being detectedclassName - : the class name of the detected objectlabel - : the canonical label to usecreateAnnotation - : boolean option to force creation of Annotation for each new call or reuse the first Annotation on the Text.
process
public abstract void process(org.ow2.weblab.core.model.Text text)
throws org.ow2.weblab.core.services.AccessDeniedException,
org.ow2.weblab.core.services.ContentNotAvailableException,
org.ow2.weblab.core.services.InsufficientResourcesException,
org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.ServiceNotConfiguredException,
org.ow2.weblab.core.services.UnexpectedException,
org.ow2.weblab.core.services.UnsupportedRequestException
- Throws:
org.ow2.weblab.core.services.AccessDeniedException
org.ow2.weblab.core.services.ContentNotAvailableException
org.ow2.weblab.core.services.InsufficientResourcesException
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.ServiceNotConfiguredException
org.ow2.weblab.core.services.UnexpectedException
org.ow2.weblab.core.services.UnsupportedRequestException
Copyright © 2004-2012. All Rights Reserved.