79 bool ends(
const wchar_t* s);
84 void r(
const wchar_t* s);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Base class for all Lucene classes.
Definition LuceneObject.h:31
This is the Porter stemming algorithm, coded up as thread-safe ANSI C by the author.
Definition PorterStemmer.h:26
void step1ab()
step1ab() gets rid of plurals and -ed or -ing. eg.
bool stem(CharArray word)
void step1c()
Turns terminal y to i when there is another vowel in the stem.
bool dirty
Definition PorterStemmer.h:38
bool stem(wchar_t *b, int32_t k)
In stem(b, k), b is a char pointer, and the string to be stemmed is from b[0] to b[k] inclusive....
int32_t i
Definition PorterStemmer.h:37
int32_t getResultLength()
void step4()
Takes off -ant, -ence etc., in context vcvc<v>.
void setto(const wchar_t *s)
Sets (j+1),...k to the characters in the string s, readjusting k.
bool ends(const wchar_t *s)
Returns true if 0,...k ends with the string s.
int32_t j
Definition PorterStemmer.h:36
int32_t m()
Measures the number of consonant sequences between 0 and j. If c is a consonant sequence and v a vowe...
bool cons(int32_t i)
Returns true if b[i] is a consonant. ('b' means 'z->b', but here and below we drop 'z->' in comments.
wchar_t * getResultBuffer()
bool doublec(int32_t j)
Return true if j,(j-1) contain a double consonant.
void step3()
Deals with -ic-, -full, -ness etc. similar strategy to step2.
int32_t k
Definition PorterStemmer.h:35
void step5()
Removes a final -e if m() > 1, and changes -ll to -l if m() > 1.
bool cvc(int32_t i)
Return true if i-2,i-1,i has the form consonant - vowel - consonant and also if the second c is not w...
bool vowelinstem()
Return true if 0,...j contains a vowel.
wchar_t * b
Definition PorterStemmer.h:34
void step2()
Maps double suffices to single ones. so -ization ( = -ize plus -ation) maps to -ize etc....
Definition AbstractAllTermDocs.h:12