C# Class ABB.Swum.FileStemmer

Determines the stem for a given word by reading from a file containing precomputed word/stem pairs
Inheritance: Stemmer
Show file Open project: abb-iss/Swum.NET Class Usage Examples

Protected Properties

Property Type Description
Stems string>.Dictionary

Public Methods

Method Description
FileStemmer ( string stemFilePath ) : System

Creates a new FileStemmer using the file specified.

Stem ( string word ) : string

Returns the stem for the given word.

Method Details

FileStemmer() public method

Creates a new FileStemmer using the file specified.
public FileStemmer ( string stemFilePath ) : System
stemFilePath string The path to the file containing the word/stem pairs to use.
return System

Stem() public method

Returns the stem for the given word.
public Stem ( string word ) : string
word string The word to stem.
return string

Property Details

Stems protected property

A Dictionary mapping words to their stems. This is populated from the file supplied to the constructor.
protected Dictionary Stems
return string>.Dictionary