public abstract class BaseFragListBuilder extends java.lang.Object implements FragListBuilder
FragListBuilder
.Modifier and Type | Class and Description |
---|---|
private static class |
BaseFragListBuilder.IteratorQueue<T> |
Modifier and Type | Field and Description |
---|---|
(package private) int |
margin |
static int |
MARGIN_DEFAULT |
static int |
MIN_FRAG_CHAR_SIZE_FACTOR |
(package private) int |
minFragCharSize |
Constructor and Description |
---|
BaseFragListBuilder() |
BaseFragListBuilder(int margin) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
acceptPhrase(FieldPhraseList.WeightedPhraseInfo info,
int matchLength,
int fragCharSize)
A predicate to decide if the given
FieldPhraseList.WeightedPhraseInfo should be
accepted as a highlighted phrase or if it should be discarded. |
protected FieldFragList |
createFieldFragList(FieldPhraseList fieldPhraseList,
FieldFragList fieldFragList,
int fragCharSize) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createFieldFragList
public static final int MARGIN_DEFAULT
public static final int MIN_FRAG_CHAR_SIZE_FACTOR
final int margin
final int minFragCharSize
public BaseFragListBuilder(int margin)
public BaseFragListBuilder()
protected FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList, FieldFragList fieldFragList, int fragCharSize)
protected boolean acceptPhrase(FieldPhraseList.WeightedPhraseInfo info, int matchLength, int fragCharSize)
FieldPhraseList.WeightedPhraseInfo
should be
accepted as a highlighted phrase or if it should be discarded.
The default implementation discards phrases that are composed of more than one term and where the matchLength exceeds the fragment character size.
info
- the phrase info to acceptmatchLength
- the match length of the current phrasefragCharSize
- the configured fragment character sizetrue
if this phrase info should be accepted as a highligh phrase