Class SentenceAttributeExtractor

java.lang.Object
org.apache.lucene.analysis.opennlp.SentenceAttributeExtractor

public class SentenceAttributeExtractor extends Object
Iterate through sentence tokens and cache their attributes. Could consider moving this to a more central location to be used by other sentence-aware components.

May want to consider making this its own Filter so that extracted sentence token attributes can be shared by downstream sentence-aware filters.

  • Constructor Details

    • SentenceAttributeExtractor

      public SentenceAttributeExtractor(org.apache.lucene.analysis.TokenStream input, org.apache.lucene.analysis.tokenattributes.SentenceAttribute sentenceAtt)
  • Method Details

    • extractSentenceAttributes

      public List<org.apache.lucene.util.AttributeSource> extractSentenceAttributes() throws IOException
      Throws:
      IOException
    • getSentenceAttributes

      public List<org.apache.lucene.util.AttributeSource> getSentenceAttributes()
    • allSentencesProcessed

      public boolean allSentencesProcessed()
    • reset

      public void reset()