Package de.danielnaber.jwordsplitter
Class GermanWordSplitter
- java.lang.Object
-
- de.danielnaber.jwordsplitter.AbstractWordSplitter
-
- de.danielnaber.jwordsplitter.GermanWordSplitter
-
public class GermanWordSplitter extends AbstractWordSplitter
Split German compound words. Based on an embedded dictionary, or on an external plain text dictionary.
-
-
Field Summary
Fields Modifier and Type Field Description private GermanInterfixDisambiguator
disambiguator
private static java.lang.String
EXCEPTION_DICT
private static java.util.Collection<java.lang.String>
INTERFIXES
Interfixes = Fugenelemente-
Fields inherited from class de.danielnaber.jwordsplitter.AbstractWordSplitter
words
-
-
Constructor Summary
Constructors Constructor Description GermanWordSplitter(boolean hideInterfixCharacters)
GermanWordSplitter(boolean hideInterfixCharacters, java.io.File plainTextDict)
GermanWordSplitter(boolean hideInterfixCharacters, java.io.InputStream plainTextDict)
GermanWordSplitter(boolean hideInterfixCharacters, java.util.Set<java.lang.String> words)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getDefaultMinimumWordLength()
protected GermanInterfixDisambiguator
getDisambiguator()
protected java.util.Collection<java.lang.String>
getInterfixCharacters()
Interfix elements in lowercase, e.g.protected java.util.Set<java.lang.String>
getWordList()
protected java.util.Set<java.lang.String>
getWordList(java.io.InputStream stream)
private void
init()
-
Methods inherited from class de.danielnaber.jwordsplitter.AbstractWordSplitter
addException, getAllSplits, getAllSplits, getSubWords, setExceptionFile, setMaximumWordLength, setMinimumWordLength, setStrictMode, splitWord, splitWord
-
-
-
-
Field Detail
-
EXCEPTION_DICT
private static final java.lang.String EXCEPTION_DICT
- See Also:
- Constant Field Values
-
INTERFIXES
private static final java.util.Collection<java.lang.String> INTERFIXES
Interfixes = Fugenelemente
-
disambiguator
private GermanInterfixDisambiguator disambiguator
-
-
Constructor Detail
-
GermanWordSplitter
public GermanWordSplitter(boolean hideInterfixCharacters) throws java.io.IOException
- Throws:
java.io.IOException
-
GermanWordSplitter
public GermanWordSplitter(boolean hideInterfixCharacters, java.io.InputStream plainTextDict) throws java.io.IOException
- Throws:
java.io.IOException
-
GermanWordSplitter
public GermanWordSplitter(boolean hideInterfixCharacters, java.io.File plainTextDict) throws java.io.IOException
- Throws:
java.io.IOException
-
GermanWordSplitter
public GermanWordSplitter(boolean hideInterfixCharacters, java.util.Set<java.lang.String> words) throws java.io.IOException
- Throws:
java.io.IOException
- Since:
- 4.2
-
-
Method Detail
-
init
private void init() throws java.io.IOException
- Throws:
java.io.IOException
-
getWordList
protected java.util.Set<java.lang.String> getWordList(java.io.InputStream stream) throws java.io.IOException
- Specified by:
getWordList
in classAbstractWordSplitter
- Throws:
java.io.IOException
-
getWordList
protected java.util.Set<java.lang.String> getWordList()
- Specified by:
getWordList
in classAbstractWordSplitter
-
getDisambiguator
protected GermanInterfixDisambiguator getDisambiguator()
- Specified by:
getDisambiguator
in classAbstractWordSplitter
-
getDefaultMinimumWordLength
protected int getDefaultMinimumWordLength()
- Specified by:
getDefaultMinimumWordLength
in classAbstractWordSplitter
-
getInterfixCharacters
protected java.util.Collection<java.lang.String> getInterfixCharacters()
Description copied from class:AbstractWordSplitter
Interfix elements in lowercase, e.g. at least "s" for German.- Specified by:
getInterfixCharacters
in classAbstractWordSplitter
-
-