Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
zorba::Stemmer Class Referenceabstract

A Stemmer is used to obtain the "stem" (root) word of of some word. More...

#include <zorba/stemmer.h>

Classes

struct  Properties
 Various properties of this Stemmer. More...
 

Public Types

typedef std::unique_ptr
< Stemmer,
internal::ztd::destroy_delete
< Stemmer > > 
ptr
 

Public Member Functions

virtual void destroy () const =0
 Destroys this Stemmer. More...
 
virtual void properties (Properties *result) const =0
 Gets the Properties of this Stemmer. More...
 
virtual void stem (String const &word, locale::iso639_1::type lang, String *result) const =0
 Stems the given word. More...
 

Protected Member Functions

virtual ~Stemmer ()
 

Detailed Description

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.

Definition at line 38 of file stemmer.h.

Member Typedef Documentation

Definition at line 40 of file stemmer.h.

Constructor & Destructor Documentation

virtual zorba::Stemmer::~Stemmer ( )
protectedvirtual

Member Function Documentation

virtual void zorba::Stemmer::destroy ( ) const
pure virtual

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.

virtual void zorba::Stemmer::properties ( Properties result) const
pure virtual

Gets the Properties of this Stemmer.

Parameters
resultThe Properties to populate.
virtual void zorba::Stemmer::stem ( String const &  word,
locale::iso639_1::type  lang,
String result 
) const
pure virtual

Stems the given word.

Parameters
wordThe word to stem.
langThe language of the word.
resultThe 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).

The documentation for this class was generated from the following file:
blog comments powered by Disqus