Xapian::Stem Class Reference

Class representing a stemming algorithm. More...

#include <stem.h>

Collaboration diagram for Xapian::Stem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Stem (const Stem &o)
 Copy constructor.
void operator= (const Stem &o)
 Assignment.
 Stem ()
 Construct a Xapian::Stem object which doesn't change terms.
 Stem (const std::string &language)
 Construct a Xapian::Stem object for a particular language.
 ~Stem ()
 Destructor.
std::string operator() (const std::string &word) const
 Stem a word.
std::string get_description () const
 Return a string describing this object.

Static Public Member Functions

static std::string get_available_languages ()
 Return a list of available languages.

Private Attributes

Xapian::Internal::RefCntPtr<
Internal
internal
 

For internal use only.

Reference counted internals.



Classes

class  Internal

Detailed Description

Class representing a stemming algorithm.

Definition at line 32 of file stem.h.


Constructor & Destructor Documentation

Xapian::Stem::Stem ( const Stem o  ) 

Copy constructor.

Definition at line 36 of file stem.cc.

Xapian::Stem::Stem (  ) 

Construct a Xapian::Stem object which doesn't change terms.

Equivalent to Stem("none").

Definition at line 44 of file stem.cc.

Xapian::Stem::Stem ( const std::string &  language  )  [explicit]

Construct a Xapian::Stem object for a particular language.

Parameters:
language Either the English name for the language or the two letter ISO639 code.
The following language names are understood (aliases follow the name):

Exceptions:
Xapian::InvalidArgumentError is thrown if language isn't recognised.

Definition at line 46 of file stem.cc.

Xapian::Stem::~Stem (  ) 

Destructor.

Definition at line 170 of file stem.cc.


Member Function Documentation

void Xapian::Stem::operator= ( const Stem o  ) 

Assignment.

Definition at line 39 of file stem.cc.

References internal.

string Xapian::Stem::operator() ( const std::string &  word  )  const

Stem a word.

Parameters:
word a word to stem.
Returns:
the stem

Definition at line 173 of file stem.cc.

string Xapian::Stem::get_description (  )  const

Return a string describing this object.

Definition at line 180 of file stem.cc.

string Xapian::Stem::get_available_languages (  )  [static]

Return a list of available languages.

Each stemmer is only included once in the list (not once for each alias). The name included is the English name of the language.

The list is returned as a string, with language names separated by spaces. This is a static method, so a Xapian::Stem object is not required for this operation.

Definition at line 193 of file stem.cc.

References LANGSTRING.

Referenced by DEFINE_TESTCASE(), and main().


Member Data Documentation

Xapian::Internal::RefCntPtr<Internal> Xapian::Stem::internal [private]

For internal use only.

Reference counted internals.

Definition at line 35 of file stem.h.

Referenced by operator=().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.