예제 #1
1
 public spelling.Dictionary getDictionary() {
   spelling.Dictionary d = new spelling.DictionaryBST();
   spelling.DictionaryLoader.loadDictionary(d, dictFile);
   return d;
 }
예제 #2
1
 public spelling.AutoComplete getAutoComplete() {
   spelling.AutoCompleteDictionaryTrie tr = new spelling.AutoCompleteDictionaryTrie();
   spelling.DictionaryLoader.loadDictionary(tr, dictFile);
   return tr;
 }
  /** @throws java.lang.Exception */
  @Before
  public void setUp() throws Exception {
    emptyDict = new DictionaryBST();
    smallDict = new DictionaryBST();
    largeDict = new DictionaryBST();

    smallDict.addWord("Hello");
    smallDict.addWord("HElLo");
    smallDict.addWord("help");
    smallDict.addWord("a");
    smallDict.addWord("subsequent");

    DictionaryLoader.loadDictionary(largeDict, dictFile);
  }