Examples of AbstractWordSplitter


Examples of de.abelssoft.wordtools.jwordsplitter.AbstractWordSplitter

    return RULE_ID;
  }
 
  private static AbstractWordSplitter getCompoundSplitter() {
    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);
      return wordSplitter;
    } catch (IOException e) {
      throw new RuntimeException("Could not set up German compound splitter", e);
    }
View Full Code Here

Examples of de.abelssoft.wordtools.jwordsplitter.AbstractWordSplitter

   * @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);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.