Lucene.Net
3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
|
Stemmer, implementing the Porter Stemming Algorithm More...
Public Member Functions | |
PorterStemmer () | |
virtual void | Reset () |
reset() resets the stemmer so it can stem another word. If you invoke the stemmer by calling add(char) and then stem(), you must call reset() before starting another word. | |
virtual void | Add (char ch) |
Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word. | |
override System.String | ToString () |
After a word has been stemmed, it can be retrieved by toString(), or a reference to the internal buffer can be retrieved by getResultBuffer and getResultLength (which is generally more efficient.) | |
virtual System.String | Stem (System.String s) |
Stem a word provided as a String. Returns the result as a String. | |
virtual bool | Stem (char[] word) |
Stem a word contained in a char[]. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString(). | |
virtual bool | Stem (char[] wordBuffer, int offset, int wordLen) |
Stem a word contained in a portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString(). | |
virtual bool | Stem (char[] word, int wordLen) |
Stem a word contained in a leading portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString(). | |
virtual bool | Stem () |
Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString(). | |
virtual bool | Stem (int i0) |
Static Public Member Functions | |
static void | Main (System.String[] args) |
Test program for demonstrating the Stemmer. It reads a file and stems each word, writing the result to standard out. Usage: Stemmer file-name | |
Properties | |
virtual int | ResultLength [get] |
Returns the length of the word resulting from the stemming process. | |
virtual char[] | ResultBuffer [get] |
Returns a reference to a character buffer containing the results of the stemming process. You also need to consult getResultLength() to determine the length of the result. | |
Stemmer, implementing the Porter Stemming Algorithm
The Stemmer class transforms a word into its root form. The input word can be provided a character at time (by calling add()), or at once by calling one of the various stem(something) methods.
Definition at line 54 of file PorterStemmer.cs.
Lucene.Net.Analysis.PorterStemmer.PorterStemmer | ( | ) |
Definition at line 62 of file PorterStemmer.cs.
|
virtual |
Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word.
Definition at line 80 of file PorterStemmer.cs.
|
static |
Test program for demonstrating the Stemmer. It reads a file and stems each word, writing the result to standard out. Usage: Stemmer file-name
Definition at line 689 of file PorterStemmer.cs.
|
virtual |
reset() resets the stemmer so it can stem another word. If you invoke the stemmer by calling add(char) and then stem(), you must call reset() before starting another word.
Definition at line 72 of file PorterStemmer.cs.
|
virtual |
Stem a word provided as a String. Returns the result as a String.
Definition at line 611 of file PorterStemmer.cs.
|
virtual |
Stem a word contained in a char[]. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
Definition at line 625 of file PorterStemmer.cs.
|
virtual |
Stem a word contained in a portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
Definition at line 635 of file PorterStemmer.cs.
|
virtual |
Stem a word contained in a leading portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
Definition at line 653 of file PorterStemmer.cs.
|
virtual |
Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
Definition at line 663 of file PorterStemmer.cs.
|
virtual |
Definition at line 668 of file PorterStemmer.cs.
override System.String Lucene.Net.Analysis.PorterStemmer.ToString | ( | ) |
After a word has been stemmed, it can be retrieved by toString(), or a reference to the internal buffer can be retrieved by getResultBuffer and getResultLength (which is generally more efficient.)
Definition at line 95 of file PorterStemmer.cs.
|
get |
Returns a reference to a character buffer containing the results of the stemming process. You also need to consult getResultLength() to determine the length of the result.
Definition at line 111 of file PorterStemmer.cs.
|
get |
Returns the length of the word resulting from the stemming process.
Definition at line 102 of file PorterStemmer.cs.