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 Summary
Constructors Constructor Description SentenceAttributeExtractor(TokenStream input, SentenceAttribute sentenceAtt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSentencesProcessed()
List<AttributeSource>
extractSentenceAttributes()
List<AttributeSource>
getSentenceAttributes()
void
reset()
-
-
-
Constructor Detail
-
SentenceAttributeExtractor
public SentenceAttributeExtractor(TokenStream input, SentenceAttribute sentenceAtt)
-
-
Method Detail
-
extractSentenceAttributes
public List<AttributeSource> extractSentenceAttributes() throws IOException
- Throws:
IOException
-
getSentenceAttributes
public List<AttributeSource> getSentenceAttributes()
-
allSentencesProcessed
public boolean allSentencesProcessed()
-
reset
public void reset()
-
-