zorba::Stemmer

#include <zorba/stemmer.h>

A Stemmer is used to obtain the "stem" (root) word of of some word. For example the stem of "flavoring" is "flavor". A Stemmer is used by the XQuery Full Text feature.

Public Functions

void

destroy() const =0

Destroys this Stemmer.

void

properties(Properties *result) const =0

Gets the Properties of this Stemmer.

void

stem(String const &word, locale::iso639_1::type lang, String *result) const =0

Stems the given word.

Protected Functions

~Stemmer()

Public Functions

destroy

void destroy() const =0

Destroys this Stemmer.

This function is called by Zorba when the Stemmer is no longer needed.If your StemmerProvider dynamically allocates Stemmer objects, then the implementation can simply be (and usually is) delete this.If your StemmerProvider returns a pointer to a static Stemmer object, then the implementation should do nothing.

properties

void properties(Properties *result) const =0

Gets the Properties of this Stemmer.

Parameters

result The Properties to populate.

stem

void stem(String const &word, locale::iso639_1::type lang, String *result) const =0

Stems the given word.

Parameters

word The word to stem.
lang The language of the word.
result The stemmed word (or the original word if either it and its stem are the same word or the stemmer doesn't know how to stem it).

Protected Functions

~Stemmer

 ~Stemmer()