Class WordNet.Processor

  • All Implemented Interfaces:
    io.annot8.api.components.Annot8Component, io.annot8.api.components.Processor, AutoCloseable
    Enclosing class:
    WordNet

    public static class WordNet.Processor
    extends AbstractTextProcessor
    • Constructor Summary

      Constructors 
      Constructor Description
      Processor()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Optional<net.sf.extjwnl.data.IndexWord> lookupWord​(net.sf.extjwnl.data.POS pos, String word)
      Lookup the word from the dictionary, performing lemmisation if required.
      protected void process​(io.annot8.common.data.content.Text content)  
      static net.sf.extjwnl.data.POS toPos​(String pos)
      Convert a string (Penntree bank / simple word) to a Part of speech type.
      • Methods inherited from class io.annot8.components.base.processors.AbstractContentProcessor

        accept, process
      • Methods inherited from class io.annot8.common.components.AbstractComponent

        createDefaultLogger, createDefaultMetrics, log, metrics, setLogger, setMetrics
    • Constructor Detail

      • Processor

        public Processor()
    • Method Detail

      • process

        protected void process​(io.annot8.common.data.content.Text content)
        Specified by:
        process in class io.annot8.components.base.processors.AbstractContentProcessor<io.annot8.common.data.content.Text>
      • close

        public void close()
      • toPos

        public static net.sf.extjwnl.data.POS toPos​(String pos)
        Convert a string (Penntree bank / simple word) to a Part of speech type.
        Parameters:
        pos - the pos
        Returns:
        the pos
      • lookupWord

        public Optional<net.sf.extjwnl.data.IndexWord> lookupWord​(net.sf.extjwnl.data.POS pos,
                                                                  String word)
        Lookup the word from the dictionary, performing lemmisation if required.
        Parameters:
        pos - the pos
        word - the word
        Returns:
        the WordNet word, (as an optional)