* @since 2.7
*/
public CompoundWordTokenizer getNonStrictCompoundSplitter() {
if (compoundTokenizer == null) {
try {
final AbstractWordSplitter wordSplitter = new GermanWordSplitter(false);
wordSplitter.setStrictMode(false); // there's a spelling mistake in (at least) one part, so strict mode wouldn't split the word
((GermanWordSplitter)wordSplitter).setMinimumWordLength(3);
compoundTokenizer = new CompoundWordTokenizer() {
@Override
public List<String> tokenize(String word) {
return new ArrayList<>(wordSplitter.splitWord(word));
}
};
} catch (IOException e) {
throw new RuntimeException("Could not set up German compound splitter", e);
}