//############################### method's, which the keyboard is using ############################## //load the data from the txt-file public void loadFile() { //Load AutoCompleteSuggestion-Dictionary this.autoCompleteDic = FileHandlerDictEntry.read(); if (this.autoCompleteDic == null) { this.autoCompleteDic = new DictEntryMultyWord(); } //this.autoCompleteDic.print (); }
//called by the keyboard to add eventually new words to the dictionary public void enteredText(string text) { string[] words = this.getWordsFromInput(text); if (words != null) { for (int i = 0; i < words.Length; i++) { DictEntrySingleWord entry = autoCompleteDic.insert(words [i]); if (entry != null) { FileHandlerDictEntry.write(entry); } } } //TestDictionary t = new TestDictionary (); /*List<DictEntrySingleWord> stringlist = autoCompleteDic.getSortedLikelyWordsAfterRate(""); * foreach (DictEntrySingleWord s in stringlist) * Debug.Log( "Words: " + s.getWord() ); */ }