40 Stem::Stem(
const Stem & o) : internal(o.internal) { }
59 int l =
keyword2(
tab, language.data(), language.size());
61 switch (static_cast<sbl_code>(l)) {
124 if (fallback || language.empty())
142 if (!
internal.
get() || word.empty())
return word;
143 return internal->operator()(word);
149 string desc =
"Xapian::Stem(";
150 if (
internal.
get()) {
151 desc +=
internal->get_description();
The Xapian namespace contains public interfaces for the Xapian library.
static const unsigned char tab[]
Class representing a stemming algorithm.
Xapian::Internal::intrusive_ptr< StemImplementation > internal
Stem()
Construct a Xapian::Stem object which doesn't change terms.
int keyword2(const unsigned char *p, const char *s, size_t len)
2 byte offset variant.
std::string operator()(const std::string &word) const
Stem a word.
Hierarchy of classes which Xapian can throw as exceptions.
Stem & operator=(const Stem &o)
Assignment.
InvalidArgumentError indicates an invalid parameter value was passed to the API.
Base class for implementations of stemming algorithms.
std::string get_description() const
Return a string describing this object.
Efficient keyword to enum lookup.
Map string to language code.
Class representing a stemming algorithm implementation.
static StemImplementation * stem_internal_factory(const std::string &language, bool fallback)