Package net.didion.jwnl.dictionary.morph
Class TokenizerOperation
java.lang.Object
net.didion.jwnl.dictionary.morph.AbstractDelegatingOperation
net.didion.jwnl.dictionary.morph.TokenizerOperation
- All Implemented Interfaces:
Operation
,Createable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
static final String
Parameter list that determines the delimiters this operation will use to concatanate tokens.static final String
Parameter that determines the operations this operation will perform on the phrases.static final String
Parameter that determines the operations this operation will perform on the tokens. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
execute
(POS pos, String lemma, BaseFormSet forms) Execute the operation.protected AbstractDelegatingOperation
getInstance
(Map params) protected String[]
getKeys()
private boolean
tryAllCombinations
(POS pos, String[] tokens, String delimiter, BaseFormSet forms) private boolean
tryAllCombinations
(POS pos, BaseFormSet[] tokenForms, int startIndex, int endIndex, BaseFormSet forms) Methods inherited from class net.didion.jwnl.dictionary.morph.AbstractDelegatingOperation
addDelegate, create, delegate, hasDelegate
-
Field Details
-
TOKEN_OPERATIONS
Parameter that determines the operations this operation will perform on the tokens.- See Also:
-
PHRASE_OPERATIONS
Parameter that determines the operations this operation will perform on the phrases.- See Also:
-
DELIMITERS
Parameter list that determines the delimiters this operation will use to concatanate tokens.- See Also:
-
_delimiters
-
-
Constructor Details
-
TokenizerOperation
public TokenizerOperation() -
TokenizerOperation
-
-
Method Details
-
getInstance
- Specified by:
getInstance
in classAbstractDelegatingOperation
- Throws:
JWNLException
-
getKeys
- Specified by:
getKeys
in classAbstractDelegatingOperation
-
execute
Description copied from interface:Operation
Execute the operation.- Parameters:
pos
-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
-
tryAllCombinations
private boolean tryAllCombinations(POS pos, BaseFormSet[] tokenForms, int startIndex, int endIndex, BaseFormSet forms) throws JWNLException - Throws:
JWNLException
-
tryAllCombinations
private boolean tryAllCombinations(POS pos, String[] tokens, String delimiter, BaseFormSet forms) throws JWNLException - Throws:
JWNLException
-