|
Qizx/db 2.1 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Pluggable text analyzer for custom full-text indexing and query. Analyzes text chunks to extract and normalize words.
To parse words, the sieve is first initialized with method
start(String) 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 source character at a given position. |
Indexing.WordSieve |
copy()
Creates a carbon copy of this object. |
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. |
char |
multiCharsWildcard()
Returns the wildcard character which matches several characters. |
char |
nextChar()
Moves to next source character and returns it, returns 0 if at end. |
char[] |
nextWord()
Returns the next normalized word, or null if the end of the fragment to analyze is reached. |
char |
singleCharWildcard()
Returns the wildcard character which matches a single character. |
void |
start(char[] text,
int length)
Starts the analysis of a new text chunk. |
void |
start(String text)
Starts the analysis of a new text chunk. |
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. |
| Methods inherited from interface com.qizx.api.Indexing.Sieve |
getParameters, setParameters |
| Method Detail |
public void start(char[] text,
int length)
text - characters to analyze, index from 0 to length - 1length - number of characters in the text arraypublic void start(String text)
text - fragment to analyzepublic char[] nextWord()
public int wordOffset()
public int wordLength()
public char charAt(int ahead)
ahead - an offset to the current position of the sieve in the
source text. If equal to 0, return the character at current
position.
public char nextChar()
public char mapChar(char c)
c - a source character converted to a normalized value in the
returned word, for example converted to uppercase.
public boolean isWordStart(char c)
c - a source character
public boolean isWordPart(char c)
c - a source character
public char multiCharsWildcard()
public char singleCharWildcard()
public Indexing.WordSieve copy()
|
© 2008 Axyana Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||