abstract class StructuredParser extends AbstractParser
AbstractParser.Submodes
braceLevelURL, environment, indexFacts, language, submodes, tokens
Modifier | Constructor and Description |
---|---|
protected |
StructuredParser(ParserEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
private boolean |
addEndMarking() |
private boolean |
addStartMarking() |
protected Item |
compositeItem() |
private String |
concatenate(List<Token> tokens) |
private String |
decimalPart() |
private boolean |
endOfNumber() |
private StringBuilder |
getStringContents(Item item) |
protected abstract Item |
handleComposite(boolean topLevel) |
protected Item |
indexableItem() |
private String |
indexPrefix() |
private boolean |
nothingAhead(boolean skip) |
private IntItem |
number(boolean hasIndex) |
private IntItem |
numberGreater() |
private IntItem |
numberRange() |
private IntItem |
numberSmaller() |
private Item |
phrase()
An phrase or word, either marked by quotes or by non-spaces between
words or by a combination.
|
private Item |
phraseBody()
Returns a word, a phrase or another composite
|
private Item |
phraseWord(boolean insidePhrase)
Words for phrases also permits numerals as words
|
protected void |
setSubmodeFromIndex(String indexName,
IndexFacts.Session indexFacts)
Sets the submodes used for url parsing.
|
private boolean |
skipToNextPhraseWord(boolean quoted)
Skips one or multiple phrase separators
|
private boolean |
URLModePhraseChar() |
private boolean |
URLModeWordChar() |
private int |
weightSuffix()
Returns the specified term weight, or -1 if there is no weight suffix
|
private Item |
word()
Returns a WordItem if this is a non CJK query,
a WordItem or PhraseSegmentItem if this is a CJK query,
null if the current item is not a word
|
private boolean |
wordsAhead() |
normalize, parse, parse, parseItems, segment, setState, simplifyPhrases, tokenize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parse
protected StructuredParser(ParserEnvironment environment)
protected abstract Item handleComposite(boolean topLevel)
protected Item compositeItem()
protected void setSubmodeFromIndex(String indexName, IndexFacts.Session indexFacts)
protected Item indexableItem()
private boolean wordsAhead()
private boolean nothingAhead(boolean skip)
private String indexPrefix()
private int weightSuffix()
private boolean endOfNumber()
private String decimalPart()
private IntItem number(boolean hasIndex)
private IntItem numberRange()
private IntItem numberSmaller()
private IntItem numberGreater()
private Item phraseWord(boolean insidePhrase)
private Item word()
private StringBuilder getStringContents(Item item)
private Item phrase()
private Item phraseBody()
private boolean addStartMarking()
private boolean addEndMarking()
private boolean skipToNextPhraseWord(boolean quoted)
private boolean URLModeWordChar()
private boolean URLModePhraseChar()
Copyright © 2017. All rights reserved.