public class DataDrivenSplitterAlgorithm extends Object implements SplitterAlgorithm
Constructor and Description |
---|
DataDrivenSplitterAlgorithm()
Empty constructor
Before you use this class set the dictionary and the linking morphemes with the setter
methods
|
DataDrivenSplitterAlgorithm(SimpleDictionary aDictionary,
LinkingMorphemes aMorphemes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected List<DecompoundedWord> |
checkForMorphemes(DecompoundedWord aSplit) |
protected List<DecompoundedWord> |
makeSplit(String aWord)
Makes a single split on a given 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.
|
DecompoundingTree |
split(String aWord)
Returns all possible splits for a given word.
|
protected void |
splitIt(ValueNode<DecompoundedWord> aParent,
int aDepth)
Builds a splitting tree
|
public DataDrivenSplitterAlgorithm()
public DataDrivenSplitterAlgorithm(SimpleDictionary aDictionary, LinkingMorphemes aMorphemes)
aDictionary
- A simple dictionary objectaMorphemes
- A list of linking morphemespublic DecompoundingTree split(String aWord)
SplitterAlgorithm
split
in interface SplitterAlgorithm
aWord
- The word to splitprotected void splitIt(ValueNode<DecompoundedWord> aParent, int aDepth)
aParent
- The parent nodeaDepth
- the current depth.protected List<DecompoundedWord> makeSplit(String aWord)
aWord
- a word.protected List<DecompoundedWord> checkForMorphemes(DecompoundedWord aSplit)
public void setDictionary(Dictionary aDict)
SplitterAlgorithm
setDictionary
in interface SplitterAlgorithm
aDict
- The dictionarypublic void setLinkingMorphemes(LinkingMorphemes aLinkingMorphemes)
SplitterAlgorithm
setLinkingMorphemes
in interface SplitterAlgorithm
aLinkingMorphemes
- the linking morphemespublic void setMaximalTreeDepth(int aDepth)
SplitterAlgorithm
setMaximalTreeDepth
in interface SplitterAlgorithm
aDepth
- maximal tree depth.Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.