public class SimpleSpanFragmenter extends java.lang.Object implements Fragmenter
Fragmenter implementation which breaks text up into same-size
fragments but does not split up Spans. This is a simple sample class.| Constructor and Description |
|---|
SimpleSpanFragmenter(SpanScorer spanscorer) |
SimpleSpanFragmenter(SpanScorer spanscorer,
int fragmentSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNewFragment(Token token)
Test to see if this token from the stream should be held in a new TextFragment
|
void |
start(java.lang.String originalText)
Initializes the Fragmenter
|
public SimpleSpanFragmenter(SpanScorer spanscorer)
spanscorer - SpanScorer that was used to score hitspublic SimpleSpanFragmenter(SpanScorer spanscorer, int fragmentSize)
spanscorer - SpanScorer that was used to score hitsfragmentSize - size in bytes of each fragmentpublic boolean isNewFragment(Token token)
FragmenterisNewFragment in interface Fragmenterpublic void start(java.lang.String originalText)
Fragmenterstart in interface FragmenterCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.