Class WholeDocumentLanguageDispatchAnnotator

java.lang.Object
com.basistech.rosette.dm.util.WholeDocumentLanguageDispatchAnnotator
All Implemented Interfaces:
Annotator

public class WholeDocumentLanguageDispatchAnnotator extends Object implements Annotator
An annotator that delegates to one of a collection of per-language annotators. This picks the annotator based on the first detected language, and has no provision to dispatch 'other' languages as if they are unknown. If the best detected language is not in the map, this throws RosetteUnsupportedLanguageException.
  • Method Details

    • annotate

      public AnnotatedText annotate(CharSequence input)
      Description copied from interface: Annotator
      Annotates raw text with attributes. For example, a base linguistics annotator may accept raw text and annotate it with token attributes.
      Specified by:
      annotate in interface Annotator
      Parameters:
      input - data to process
      Returns:
      annotated data
    • annotate

      public AnnotatedText annotate(AnnotatedText input)
      Description copied from interface: Annotator
      Annotates an existing text object with additional attributes. For example, an entity annotator may take the output of a base linguistics annotator (which has token annotations) and add additional entities attributes.
      Specified by:
      annotate in interface Annotator
      Parameters:
      input - data to process
      Returns:
      annotated data