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 Detail

      • Processor

        public Processor()
    • Method Detail

      • process

        protected void process​(io.annot8.common.data.content.Text content)
        Specified by:
        process in class 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)