net.sf.extjwnl.dictionary.morph
Class DetachSuffixesOperation

java.lang.Object
  extended by net.sf.extjwnl.dictionary.morph.AbstractOperation
      extended by net.sf.extjwnl.dictionary.morph.AbstractDelegatingOperation
          extended by net.sf.extjwnl.dictionary.morph.DetachSuffixesOperation
All Implemented Interfaces:
Operation, Owned

public class DetachSuffixesOperation
extends AbstractDelegatingOperation

Remove all applicable suffixes from the word(s) and do a look-up. This class accepts parameters in the form of:


  

 
where suffix is the {suffix} to convert from, and {stemmed suffix} is the suffix to convert to.

Author:
John Didion , Aliaksandr Autayeu

Field Summary
static String OPERATIONS
           
 
Fields inherited from class net.sf.extjwnl.dictionary.morph.AbstractDelegatingOperation
params
 
Fields inherited from class net.sf.extjwnl.dictionary.morph.AbstractOperation
dictionary
 
Constructor Summary
DetachSuffixesOperation(Dictionary dictionary, Map<String,Param> params)
           
 
Method Summary
 boolean execute(POS pos, String derivation, BaseFormSet forms)
          Executes the operation.
protected  String[] getKeys()
           
 Map<POS,String[][]> getSuffixMap()
           
 void setSuffixMap(Map<POS,String[][]> suffixMap)
           
 
Methods inherited from class net.sf.extjwnl.dictionary.morph.AbstractDelegatingOperation
addDelegate, delegate, hasDelegate
 
Methods inherited from class net.sf.extjwnl.dictionary.morph.AbstractOperation
getDictionary, setDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPERATIONS

public static final String OPERATIONS
See Also:
Constant Field Values
Constructor Detail

DetachSuffixesOperation

public DetachSuffixesOperation(Dictionary dictionary,
                               Map<String,Param> params)
                        throws JWNLException
Throws:
JWNLException
Method Detail

getKeys

protected String[] getKeys()
Specified by:
getKeys in class AbstractDelegatingOperation

getSuffixMap

public Map<POS,String[][]> getSuffixMap()

setSuffixMap

public void setSuffixMap(Map<POS,String[][]> suffixMap)

execute

public boolean execute(POS pos,
                       String derivation,
                       BaseFormSet forms)
                throws JWNLException
Description copied from interface: Operation
Executes the operation.

Parameters:
pos - part of speech
derivation - lemma
forms - BaseFormSet to which all discovered base forms should be added.
Returns:
true if at least one base form was discovered by the operation and added to baseForms.
Throws:
JWNLException - JWNLException


Copyright © 2011. All Rights Reserved.