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 stem_word (const std::string &word) const
 For compatibility with Xapian 0.8.5 and earlier.
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.

Public Attributes

Xapian::Internal::RefCntPtr<
Internal > 
internal

Detailed Description

Class representing a stemming algorithm.


Constructor & Destructor Documentation

Xapian::Stem::Stem const Stem o  ) 
 

Copy constructor.

Xapian::Stem::Stem  ) 
 

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

Equivalent to Stem("none").

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):

  • none - don't stem terms
  • danish (da)
  • dutch (nl)
  • english (en) - Martin Porter's 2002 revision of his stemmer
  • english_lovins (lovins) - Lovin's stemmer
  • english_porter (porter) - Porter's stemmer as described in his 1980 paper
  • finnish (fi)
  • french (fr)
  • german (de)
  • italian (it)
  • norwegian (no)
  • portuguese (pt)
  • russian (ru)
  • spanish (es)
  • swedish (sv)

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

Xapian::Stem::~Stem  ) 
 

Destructor.


Member Function Documentation

static std::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.

std::string Xapian::Stem::get_description  )  const
 

Return a string describing this object.

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

Stem a word.

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

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

Assignment.

std::string Xapian::Stem::stem_word const std::string &  word  )  const [inline]
 

For compatibility with Xapian 0.8.5 and earlier.


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.9.6).
Generated on 15 May 2006 by Doxygen 1.4.6.