morfologik.stemmers
Class Lametyzator

java.lang.Object
  extended by morfologik.stemmers.Lametyzator
All Implemented Interfaces:
IStemmer

public class Lametyzator
extends java.lang.Object
implements IStemmer

A stemmer performing dictionary lookups for stemmed forms and their tags. This stemmer requires an FSA-compiled dictionary and is a simple delegate to DictionaryStemmer.

See Also:
DictionaryStemmer

Field Summary
static java.lang.String PROPERTY_NAME_LAMETYZATOR_DICTIONARY
          Global system property that overrides the default dictionary resource in Lametyzator().
 
Constructor Summary
Lametyzator()
          This constructor is initialized with a built-in dictionary or fails with a runtime exception if the dictionary is not available.
Lametyzator(Dictionary dictionary)
          This constructor uses an explicit Dictionary.
 
Method Summary
 java.lang.String[] stem(java.lang.String word)
          Returns an array of potential base forms (stems) of the word, or null if the word is not found in the dictionary.
 java.lang.String[] stemAndForm(java.lang.String word)
          Returns an array of pairs of the form: String stem1, String form1, String stem2, String stem2, ...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_NAME_LAMETYZATOR_DICTIONARY

public static final java.lang.String PROPERTY_NAME_LAMETYZATOR_DICTIONARY
Global system property that overrides the default dictionary resource in Lametyzator().

See Also:
Constant Field Values
Constructor Detail

Lametyzator

public Lametyzator()
            throws java.io.IOException
This constructor is initialized with a built-in dictionary or fails with a runtime exception if the dictionary is not available.

Throws:
java.io.IOException

Lametyzator

public Lametyzator(Dictionary dictionary)
            throws java.io.UnsupportedEncodingException
This constructor uses an explicit Dictionary.

Throws:
java.io.UnsupportedEncodingException - If the dictionary is encoded with an encoding unsupported on this virtual machine.
Method Detail

stem

public final java.lang.String[] stem(java.lang.String word)
Description copied from interface: IStemmer
Returns an array of potential base forms (stems) of the word, or null if the word is not found in the dictionary.

Specified by:
stem in interface IStemmer
See Also:
IStemmer.stem(String)

stemAndForm

public final java.lang.String[] stemAndForm(java.lang.String word)
Description copied from interface: IStemmer

Returns an array of pairs of the form:

 String stem1, String form1, String stem2, String stem2, ...
 
or null if the word is not found in the dictionary.

The form tag is a simple string and depends on what was saved in the automaton (it may be nonsensical or even null).

Specified by:
stemAndForm in interface IStemmer
See Also:
IStemmer.stemAndForm(String)