JASSv2
Public Member Functions | Static Public Member Functions | List of all members
JASS::stem Class Referenceabstract

Baseclass for stemming algorithms. More...

#include <stem.h>

Inheritance diagram for JASS::stem:
Inheritance graph
[legend]

Public Member Functions

 stem ()
 Constructor.
 
virtual ~stem ()
 Destructor.
 
virtual std::string name (void)=0
 Return the name of the stemming algorithm. More...
 
virtual size_t tostem (char *destination, const char *source, size_t source_length)=0
 Stem from source into destination. More...
 
virtual size_t tostem (parser::token &destination, const parser::token &source)
 Stem from term into destination. More...
 

Static Public Member Functions

static void unittest (void)
 Unit test this class.
 

Detailed Description

Baseclass for stemming algorithms.

Member Function Documentation

◆ name()

virtual std::string JASS::stem::name ( void  )
pure virtual

Return the name of the stemming algorithm.

Returns
The name of the stemmer

Implemented in JASS::stem_porter.

◆ tostem() [1/2]

virtual size_t JASS::stem::tostem ( char *  destination,
const char *  source,
size_t  source_length 
)
pure virtual

Stem from source into destination.

Parameters
destination[out] the result of the steming process (the stem)
source[in] the term to stem
source_length[in] the length of the string to stem
Returns
the length of the stem

Implemented in JASS::stem_porter.

◆ tostem() [2/2]

virtual size_t JASS::stem::tostem ( parser::token destination,
const parser::token source 
)
inlinevirtual

Stem from term into destination.

Parameters
destination[out] the result of the steming process (the stem).
source[in] the term to stem

source and destination can be the same.

Returns
the length of the stem

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