public class LeftToRightSplitterAlgorithm extends Object implements SplitterAlgorithm
Constructor and Description |
---|
LeftToRightSplitterAlgorithm()
Empty constructor.
|
LeftToRightSplitterAlgorithm(Dictionary aDict,
LinkingMorphemes aMorphemes)
Create a instance of the algorithm
|
Modifier and Type | Method and Description |
---|---|
Dictionary |
getDictionary() |
int |
getMaxTreeDepth() |
int |
getMinRestLength() |
int |
getMinWordLength() |
LinkingMorphemes |
getMorphemes() |
protected void |
ltrSplit(ValueNode<DecompoundedWord> aParent,
int aDepth)
The basic split algorithm.
|
protected List<DecompoundedWord> |
makeSplit(String aWord)
Splits a word in two word.
|
void |
setDictionary(Dictionary aDict)
Sets the dictionary for the algorithm
|
void |
setLinkingMorphemes(LinkingMorphemes aLinkingMorphemes)
Sets the linking morphemes for the algorithm
|
void |
setMaximalTreeDepth(int aDepth)
Set the maximal tree depth.
|
void |
setMinRestLength(int aMinRestLength) |
void |
setMinWordLength(int aMinWordLength) |
DecompoundingTree |
split(String aWord)
Returns all possible splits for a given word.
|
public LeftToRightSplitterAlgorithm()
public LeftToRightSplitterAlgorithm(Dictionary aDict, LinkingMorphemes aMorphemes)
aDict
- A dictionary with all wordsaMorphemes
- A LinkingMorphemes classpublic DecompoundingTree split(String aWord)
SplitterAlgorithm
split
in interface SplitterAlgorithm
aWord
- The word to splitprotected void ltrSplit(ValueNode<DecompoundedWord> aParent, int aDepth)
aParent
- The parent nodeaDepth
- the current depth.protected List<DecompoundedWord> makeSplit(String aWord)
aWord
- a word.public void setDictionary(Dictionary aDict)
SplitterAlgorithm
setDictionary
in interface SplitterAlgorithm
aDict
- The dictionarypublic Dictionary getDictionary()
public void setLinkingMorphemes(LinkingMorphemes aLinkingMorphemes)
SplitterAlgorithm
setLinkingMorphemes
in interface SplitterAlgorithm
aLinkingMorphemes
- the linking morphemespublic LinkingMorphemes getMorphemes()
public void setMaximalTreeDepth(int aDepth)
SplitterAlgorithm
setMaximalTreeDepth
in interface SplitterAlgorithm
aDepth
- maximal tree depth.public int getMaxTreeDepth()
public void setMinWordLength(int aMinWordLength)
public int getMinWordLength()
public void setMinRestLength(int aMinRestLength)
public int getMinRestLength()
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.