コード例 #1
0
 public List<DecompoundedWord> getSplits(String word) throws ResourceInitializationException {
   return splitter.split(word).getAllSplits();
 }
コード例 #2
0
  public void initializeSplitterResource(String dictionaryLocation) {

    splitter = new JWordSplitterAlgorithm();
    splitter.setDictionary(new SimpleDictionary(new File(dictionaryLocation)));
    isInitialized = true;
  }