xapian-core  1.5.1
Xapian::StemStopper Class Reference

Stopper subclass which checks for both stemmed and unstemmed stopwords. More...

#include <cluster.h>

Inheritance diagram for Xapian::StemStopper:

Public Types

enum  stem_strategy {
  STEM_NONE , STEM_SOME , STEM_ALL , STEM_ALL_Z ,
  STEM_SOME_FULL_POS
}
 Stemming strategies.

Public Member Functions

 StemStopper (const Xapian::Stem &stemmer, stem_strategy strategy=STEM_SOME)
 Constructor.
std::string get_description () const override
 Return a string describing this object.
bool operator() (const std::string &term) const override
 Is term a stop-word?
void add (std::string_view term)
 Add a single stop word and its stemmed equivalent.
Public Member Functions inherited from Xapian::Stopper
 Stopper ()
 Default constructor.
virtual ~Stopper ()
 Class has virtual methods, so provide a virtual destructor.
Stopper * release ()
 Start reference counting this object.
const Stopper * release () const
 Start reference counting this object.

Detailed Description

Stopper subclass which checks for both stemmed and unstemmed stopwords.

This is intended for use with Xapian::Cluster.

Constructor & Destructor Documentation

◆ StemStopper()

Xapian::StemStopper::StemStopper ( const Xapian::Stem & stemmer,
stem_strategy strategy = STEM_SOME )
explicit

Constructor.

Parameters
stemmerThe Xapian::Stem object to set.
strategyThe stemming strategy to be used.

Member Function Documentation

◆ get_description()

std::string Xapian::StemStopper::get_description ( ) const
overridevirtual

Return a string describing this object.

Reimplemented from Xapian::Stopper.

◆ operator()()

bool Xapian::StemStopper::operator() ( const std::string & term) const
inlineoverridevirtual

Is term a stop-word?

Parameters
termThe term to test.

Implements Xapian::Stopper.


The documentation for this class was generated from the following file: