Class DetectLanguage

  • All Implemented Interfaces:
    io.annot8.core.components.Annot8Component, io.annot8.core.components.Processor, io.annot8.core.helpers.WithProcessItem, java.lang.AutoCloseable


    @ProcessesContent(io.annot8.common.data.content.Text.class)
    @CreatesAnnotation(value="entity/language",
                       bounds=io.annot8.common.data.bounds.ContentBounds.class)
    public class DetectLanguage
    extends AbstractComponent
    implements io.annot8.core.components.Processor
    Detect the language of a Text content and add the language as an annotation covering the whole Content.
    • Constructor Summary

      Constructors 
      Constructor Description
      DetectLanguage​()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(io.annot8.core.context.Context context)  
      io.annot8.core.components.responses.ProcessorResponse process​(io.annot8.core.data.Item item)  
      • Methods inherited from interface io.annot8.core.components.Annot8Component

        buildCapabilities, close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DetectLanguage

        public DetectLanguage​()
    • Method Detail

      • configure

        public void configure​(io.annot8.core.context.Context context)
                       throws io.annot8.core.exceptions.BadConfigurationException,
                              io.annot8.core.exceptions.MissingResourceException
        Specified by:
        configure in interface io.annot8.core.components.Annot8Component
        Overrides:
        configure in class AbstractComponent
        Throws:
        io.annot8.core.exceptions.BadConfigurationException
        io.annot8.core.exceptions.MissingResourceException
      • process

        public io.annot8.core.components.responses.ProcessorResponse process​(io.annot8.core.data.Item item)
        Specified by:
        process in interface io.annot8.core.helpers.WithProcessItem