Class OpenNLPMentionFixer

  • All Implemented Interfaces:
    java.util.function.Function<Span,​Span>

    public class OpenNLPMentionFixer
    extends java.lang.Object
    implements java.util.function.Function<Span,​Span>
    OpenNLP regularly extracts named entities where the last token is a quotation mark/bracket/dash, e.g.:
     Robert Tapert -
     Aliens "
     Jon Voight )
     
    This class fixes those cases, by removing the last token from the span.
    Since:
    5.3
    Version:
    5.3
    Author:
    Pedro Oliveira
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Span apply​(Span theSpan)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • OpenNLPMentionFixer

        public OpenNLPMentionFixer()
    • Method Detail

      • apply

        public Span apply​(Span theSpan)
        Specified by:
        apply in interface java.util.function.Function<Span,​Span>