public abstract class AbstractSnowballTermProcessor extends Object implements TermProcessor, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected char[] |
array |
protected int |
bra |
protected MutableString |
copy |
protected MutableString |
current |
protected int |
cursor |
protected int |
ket |
protected int |
limit |
protected int |
limit_backward |
| Constructor and Description |
|---|
AbstractSnowballTermProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected MutableString |
assign_to(MutableString s) |
protected void |
copy_from(AbstractSnowballTermProcessor other) |
AbstractSnowballTermProcessor |
copy() |
protected boolean |
eq_s_b(int s_size,
String s) |
protected boolean |
eq_s(int s_size,
String s) |
protected boolean |
eq_v_b(MutableString s) |
protected boolean |
eq_v(MutableString s) |
protected int |
find_among_b(Among[] v,
int v_size) |
protected int |
find_among(Among[] v,
int v_size) |
protected boolean |
in_grouping_b(char[] s,
int min,
int max) |
protected boolean |
in_grouping(char[] s,
int min,
int max) |
protected boolean |
in_range_b(int min,
int max) |
protected boolean |
in_range(int min,
int max) |
protected void |
insert(int c_bra,
int c_ket,
MutableString s) |
protected void |
insert(int c_bra,
int c_ket,
String s) |
protected boolean |
out_grouping_b(char[] s,
int min,
int max) |
protected boolean |
out_grouping(char[] s,
int min,
int max) |
protected boolean |
out_range_b(int min,
int max) |
protected boolean |
out_range(int min,
int max) |
boolean |
processPrefix(MutableString prefix)
Processes the given prefix, leaving the result in the same mutable string.
|
boolean |
processTerm(MutableString term)
Processes the given term, leaving the result in the same mutable string.
|
protected int |
replace_s(int c_bra,
int c_ket,
String s) |
protected void |
slice_check() |
protected void |
slice_del() |
protected void |
slice_from(String s) |
protected MutableString |
slice_to(MutableString s) |
protected abstract boolean |
stem() |
protected MutableString current
protected MutableString copy
protected char[] array
protected int cursor
protected int limit
protected int limit_backward
protected int bra
protected int ket
protected abstract boolean stem()
public boolean processTerm(MutableString term)
TermProcessorprocessTerm in interface TermProcessorterm - a mutable string containing the term to be processed,
or null.null and should be indexed, false otherwise.public boolean processPrefix(MutableString prefix)
TermProcessorThis method is not used during the indexing phase, but rather at query time. If the user wants to specify a prefix query, it is sometimes necessary to transform the prefix (e.g., DowncaseTermProcessor.processPrefix(MutableString) downcasing it).
It is of course unlikely that this method returns false, as it is usually not possible to foresee which are the prefixes of indexable words. In case no natural transformation applies, this method should leave its argument unchanged.
processPrefix in interface TermProcessorprefix - a mutable string containing a prefix to be processed,
or null.null and there might be an indexed
word starting with prefix, false otherwise.public AbstractSnowballTermProcessor copy()
copy in interface TermProcessorcopy in interface FlyweightPrototype<TermProcessor>protected void copy_from(AbstractSnowballTermProcessor other)
protected boolean in_grouping(char[] s,
int min,
int max)
protected boolean in_grouping_b(char[] s,
int min,
int max)
protected boolean out_grouping(char[] s,
int min,
int max)
protected boolean out_grouping_b(char[] s,
int min,
int max)
protected boolean in_range(int min,
int max)
protected boolean in_range_b(int min,
int max)
protected boolean out_range(int min,
int max)
protected boolean out_range_b(int min,
int max)
protected boolean eq_s(int s_size,
String s)
protected boolean eq_s_b(int s_size,
String s)
protected boolean eq_v(MutableString s)
protected boolean eq_v_b(MutableString s)
protected int find_among(Among[] v, int v_size)
protected int find_among_b(Among[] v, int v_size)
protected int replace_s(int c_bra,
int c_ket,
String s)
protected void slice_check()
protected void slice_from(String s)
protected void slice_del()
protected void insert(int c_bra,
int c_ket,
String s)
protected void insert(int c_bra,
int c_ket,
MutableString s)
protected MutableString slice_to(MutableString s)
protected MutableString assign_to(MutableString s)