Skip to main content

%iKnow.Stemming.DefaultStemmer

class %iKnow.Stemming.DefaultStemmer extends %iKnow.Stemmer

This class encapsulates logic to instantiate, use and amend stemmers for different languages. Plugin selection behavior per language is as follows: if a valid Hunspell affix and dictionary file is found in the /dev/hunspell subdirectory of your installation location (either named [language code]_*.aff or in a subdirectory named after the language code), a HunspellStemmer object will be instantiated to treat stemming requests for that language. If no such library is found, the corresponding TextStemmer will be instantiated.

If the StemWord() method is invoked for a particular language, this class will first look up the supplied string in the list of exceptions. If no exceptions are found (either default exceptions supplied with iKnow or custom exceptions in the Rule table for this namespace), the StemWord method of the instantiated Stemmer plugin object will be invoked. If the plugin supports returning multiple results, these will be filtered and only the first result satisfying the corresponding rules (stored in the iKnow language model or the Rule) will be returned.

Property Inventory

Method Inventory

Properties

property DefaultLanguage as %String [ InitialExpression = "en" ];
Default language to use when not specified in calls to Stem()
Property methods: DefaultLanguageDisplayToLogical(), DefaultLanguageGet(), DefaultLanguageIsValid(), DefaultLanguageLogicalToDisplay(), DefaultLanguageLogicalToOdbc(), DefaultLanguageNormalize(), DefaultLanguageSet()

Methods

method Reload() as %Status
Reloads underlying stemmer implementations and rules

Inherited Members

Inherited Methods

FeedbackOpens in a new tab