public class DecompoundedWord extends Object implements Comparable<DecompoundedWord>
Constructor and Description |
---|
DecompoundedWord() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(List<Fragment> aSplits)
Adds a list of split elements.
|
void |
appendSplitElement(Fragment aSplit)
Adds a split element at the end
|
int |
compareTo(DecompoundedWord aOtherSplit) |
DecompoundedWord |
createCopy()
Creates a copy of this element.
|
static DecompoundedWord |
createFromString(String aSplit)
Create a split from a string
The string has the structure: word1(morpheme)+word2(morpheme)+...+word3
For example: "Aktion(s)+plan" or "Verbraucher+zahlen"
|
boolean |
equals(Object obj) |
boolean |
equalWithoutMorpheme(DecompoundedWord aOtherSplit)
Similar to the equals method, but combines morpheme and word
|
int |
getSplitPos() |
List<Fragment> |
getSplits()
Returns all split elements
|
double |
getWeight()
Returns the ranked weight of the split.
|
String |
getWord()
Returns the complete word without + or ()
|
int |
hashCode() |
boolean |
hasLastFragmentMorpheme()
Checks if last fragment has a linking morpheme.
|
boolean |
isCompound()
Checks if this instance is a compounding word.
|
void |
prependSplitElement(Fragment aSplit)
Adds a split element to the beginning
|
void |
replaceSplitElement(int aIndex,
DecompoundedWord aSplit)
Replace one split element with a split.
|
void |
replaceSplitElement(int aIndex,
Fragment aSplitElement)
Replaces a split element with another one
|
void |
setSplitPos(int aSplitPos) |
void |
setSplits(List<Fragment> aSplits)
Set all split elements
|
void |
setWeight(double aWeight)
Sets a rank weight for the split.
|
String |
toString() |
public static DecompoundedWord createFromString(String aSplit)
aSplit
- an string-encoded splitpublic void appendSplitElement(Fragment aSplit)
aSplit
- a split.public void prependSplitElement(Fragment aSplit)
aSplit
- a split.public void setSplits(List<Fragment> aSplits)
aSplits
- all split elements.public void addAll(List<Fragment> aSplits)
aSplits
- list of fragments.public void replaceSplitElement(int aIndex, DecompoundedWord aSplit)
aIndex
- the index.aSplit
- the split.public void replaceSplitElement(int aIndex, Fragment aSplitElement)
aIndex
- the index.aSplitElement
- the fragement.public boolean equalWithoutMorpheme(DecompoundedWord aOtherSplit)
aOtherSplit
- a split.public String getWord()
public DecompoundedWord createCopy()
public double getWeight()
public void setWeight(double aWeight)
aWeight
- rank weight for the split.public int compareTo(DecompoundedWord aOtherSplit)
compareTo
in interface Comparable<DecompoundedWord>
public void setSplitPos(int aSplitPos)
public int getSplitPos()
public boolean isCompound()
public boolean hasLastFragmentMorpheme()
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.