37 return word.substr(0, 3);
103 string lang(
"xdummy");
104 for (
unsigned ch = 0; ch <= 255; ++ch) {
bool is_none() const
Return true if this is a no-op stemmer.
#define TEST(a)
Test a condition, without an additional explanation for failure.
Class representing a stemming algorithm.
void set_document(const Xapian::Document &doc)
Set the current document.
Parses a piece of text and generate terms.
void set_stemming_strategy(stem_strategy strategy)
Set the stemming strategy.
a generic test suite engine
TermIterator termlist_end() const
Equivalent end iterator for termlist_begin().
void index_text(const Xapian::Utf8Iterator &itor, Xapian::termcount wdf_inc=1, const std::string &prefix=std::string())
Index some text.
test functionality of the Xapian API
#define TEST_NOT_EQUAL(a, b)
Test for non-equality of two things.
DEFINE_TESTCASE(stem1, !backend)
Test user stemming algorithms.
InvalidArgumentError indicates an invalid parameter value was passed to the API.
std::string get_description() const
Return a string describing this object.
Public interfaces for the Xapian library.
#define TEST_EXCEPTION(TYPE, CODE)
Check that CODE throws exactly Xapian exception TYPE.
void set_stemmer(const Xapian::Stem &stemmer)
Set the Xapian::Stem object to be used for generating stemmed terms.
Class representing a stemming algorithm implementation.
string operator()(const string &word) override
Stem the specified word.
Xapian-specific test helper functions and macros.
#define TEST_EQUAL(a, b)
Test for equality of two things.
TermIterator termlist_begin() const
Start iterating the terms in this document.
A handle representing a document in a Xapian database.
string get_description() const override
Return a string describing this object.