edu.udo.cs.wvtool.external
Class LovinsStemmer

java.lang.Object
  extended by edu.udo.cs.wvtool.external.LovinsStemmer
All Implemented Interfaces:
java.io.Serializable

public class LovinsStemmer
extends java.lang.Object
implements java.io.Serializable

Implements the Lovins stemmer.

Version:
1.0
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
Serialized Form

Field Summary
private static boolean m_CompMode
          C version compatibility mode (emulates bugs in original C implementation)
private static java.util.HashMap m_l1
           
private static java.util.HashMap m_l10
           
private static java.util.HashMap m_l11
          The hash tables containing the list of endings.
private static java.util.HashMap m_l2
           
private static java.util.HashMap m_l3
           
private static java.util.HashMap m_l4
           
private static java.util.HashMap m_l5
           
private static java.util.HashMap m_l6
           
private static java.util.HashMap m_l7
           
private static java.util.HashMap m_l8
           
private static java.util.HashMap m_l9
           
 
Constructor Summary
LovinsStemmer()
           
 
Method Summary
static void main(java.lang.String[] ops)
          Stems text coming into stdin and writes it to stdout.
private  java.lang.String recodeEnding(java.lang.String word)
          Recodes ending of given word.
private  java.lang.String removeEnding(java.lang.String word)
          Finds and removes ending from given word.
 java.lang.String stem(java.lang.String word)
          Returns the stemmed version of the given word.
 java.lang.String stemString(java.lang.String str)
          Stems everything in the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_CompMode

private static boolean m_CompMode
C version compatibility mode (emulates bugs in original C implementation)


m_l11

private static java.util.HashMap m_l11
The hash tables containing the list of endings.


m_l10

private static java.util.HashMap m_l10

m_l9

private static java.util.HashMap m_l9

m_l8

private static java.util.HashMap m_l8

m_l7

private static java.util.HashMap m_l7

m_l6

private static java.util.HashMap m_l6

m_l5

private static java.util.HashMap m_l5

m_l4

private static java.util.HashMap m_l4

m_l3

private static java.util.HashMap m_l3

m_l2

private static java.util.HashMap m_l2

m_l1

private static java.util.HashMap m_l1
Constructor Detail

LovinsStemmer

public LovinsStemmer()
Method Detail

removeEnding

private java.lang.String removeEnding(java.lang.String word)
Finds and removes ending from given word.


recodeEnding

private java.lang.String recodeEnding(java.lang.String word)
Recodes ending of given word.


stem

public java.lang.String stem(java.lang.String word)
Returns the stemmed version of the given word. Expects word to be lower case.

Parameters:
word - a string consisting of a single word


stemString

public java.lang.String stemString(java.lang.String str)
Stems everything in the given string.


main

public static void main(java.lang.String[] ops)
Stems text coming into stdin and writes it to stdout.