|
Qizx/open API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Analyzes text chunks to extract and normalize words. Used in full-text indexing and search.
To parse words, the sifter is first initialized with method start on a text chunk. Then the nextWord() method is called repeatedly until the last word is parsed.
Method Summary | |
char |
charAt(int ahead)
Returns the character at current position + ahead, or 0 if after end. |
boolean |
isWordPart(char c)
Returns true if the char can be part of a word. |
boolean |
isWordStart(char c)
Returns true if the char can be at start of a word. |
char |
mapChar(char c)
Normalizes a character (belonging to a word) |
char |
nextChar()
Moves to next character and return it, returns 0 if at end. |
char[] |
nextWord()
Gets the next normalized word, or null if no more words. |
void |
start(char[] text,
int length)
Starts the analysis of a new text chunk. |
char |
wildcardSeveral()
Returns the wildcard character which matches several characters. |
char |
wildcardSingle()
Returns the wildcard character which matches a single character. |
int |
wordLength()
Returns the original length of the last word returned by nextWord. |
int |
wordOffset()
Returns the offset of the last word returned by nextWord. |
Method Detail |
public void start(char[] text, int length)
public char[] nextWord()
public int wordOffset()
public int wordLength()
public char charAt(int ahead)
public char nextChar()
public char mapChar(char c)
public boolean isWordStart(char c)
public boolean isWordPart(char c)
public char wildcardSeveral()
public char wildcardSingle()
|
© 2005 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |