org.eml.sir.util
Class SmesStemmer

java.lang.Object
  extended byorg.eml.sir.util.Stemmer
      extended byorg.eml.sir.util.SmesStemmer
All Implemented Interfaces:
java.io.Serializable

public class SmesStemmer
extends Stemmer

Stemmer refering to SMES (lexicon based).

Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Constructor Summary
SmesStemmer()
          Create a new instance of SmesStemmer.
SmesStemmer(java.lang.String imageFile)
          Create a new instance of SmesStemmer.
 
Method Summary
 java.util.HashMap stem(java.util.ArrayList words)
          Stem many words.
 java.lang.String stem(java.lang.String word)
          Stem a word.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmesStemmer

public SmesStemmer(java.lang.String imageFile)
Create a new instance of SmesStemmer.


SmesStemmer

public SmesStemmer()
Create a new instance of SmesStemmer.

Method Detail

stem

public java.lang.String stem(java.lang.String word)
Stem a word. If no stem can be computed the original String becomes stem.

Specified by:
stem in class Stemmer
Returns:
The stem of the word. A new String containing the word itself if SMES was not able to stem it.

stem

public java.util.HashMap stem(java.util.ArrayList words)
Stem many words. Words should consist of characters and hyphens only. Espacially words that contain numbers or white spaces will cause problems.

Specified by:
stem in class Stemmer
Parameters:
words - ArrayList of Strings, each a word to be stemmed.
Returns:
HashMap with words as keys and their particular stems as the values. Null if problems occured while using SMES.