%iKnow.Stemmerhidden abstract class %iKnow.Stemmer
This class represents an object responsible for stemming user input into a base form, either
through some internal algorithm or through an external library. Use
The default language to use when calling any Stem() method without supplying a language explicitly.
This method will try to decompound the supplied pWord into composing elements and returns the stems of those elements:pCompounds(n) = $lb([stem], [start pos in string], [score])
Note that most punctuation encountered in pWord (including spaces) will be considered as explicit compound boundaries (like hyphens).
Returns the stemmer configured according to the domain settings of the specified domain.
Instantiates a custom stemmer object based on the stemmer configuration named pConfigName. See also
Returns the default stemmer object for language pLanguage, which is resolved as follows:
- Check if there is a pLanguage*.aff file in INSTALL_DIR/dev/hunspell/ and just use the first you come across for the requested language, instantiating a hunspell-based stemmer object. Most libraries have a more detailed locale such as en_US.aff, which is covered by this check. Note that pLanguage should refer to the two-letter ISO code for that language.
- If no such file is found, check if there is a directory called INSTALL_DIR/dev/hunspell/pLanguage with a *.aff file within. If found, use it to instantiate a hunspell-based stemmer object.
- If no hunspell library is found, try to check if a
%Text.Textimplementation corresponding to the requested language is found and use its Standardize() method (through a %iKnow.Stemming.TextStemmer instance)
- If none found, revert to the default in %Text.Text:Standardize(), which will mostly just lowercase the string.
Resets any properties, rules or other cached information this object was using
This method will return the fully stemmed version of any string (1 or more words). If the stemmed version is equal to the original string, it will return the empty string.
This convenience method will return the fully stemmed version of any string (1 or more words). This method will return a nonempty value, regardless of whether a stemmed version was found or whether it consists of more than one word.