private void testOneEntryMoreLetters() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert("Anna"); Debug.Log("testOneEntryMoreLetters"); mw.print(); Debug.Log("........."); }
private void testOneEntryOneLetter() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert("A"); Debug.Log("testOneEntryOneLetter"); mw.print(); Debug.Log("........."); }
private void testEmpty() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert(""); Debug.Log("Leerer Eintrag"); mw.print(); Debug.Log("........."); }
//############################### 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 (); }
private void testMoreEntries() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert("Anna"); mw.insert("Annies"); mw.insert("Anke"); mw.insert("Ananas"); mw.insert("Zeit"); Debug.Log("testMoreEntries"); mw.print(); Debug.Log("........."); }
private void testMoreEntriesWithSpecialSigns() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert("Anna-Isa"); mw.insert("Annies"); mw.insert("Anke_H"); mw.insert("Ananas"); mw.insert("Zeit-Not"); mw.insert("Zeit-Krise"); Debug.Log("testMoreEntriesWithSpecialSigns"); mw.print(); Debug.Log("........."); }
public static DictEntryMultyWord read() { createPathIfNotExists(); DictEntryMultyWord entry = new DictEntryMultyWord(); try{ StreamReader reader = new StreamReader(path); while (!reader.EndOfStream) { string[] line = reader.ReadLine().Split(','); entry.insert(line [0], int.Parse(line [1])); } reader.Close(); return(entry); }catch (FileNotFoundException e) { return(null); } }
private void testTwoEntriesWithSpecialSigns() { DictEntryMultyWord mw = new DictEntryMultyWord(); mw.insert("Test-Dictionary"); List <DictEntrySingleWord> stringList = mw.getSortedLikelyWordsAfterRate("te"); Debug.Log("Search with prefix: 'te'"); foreach (DictEntrySingleWord entry in stringList) { Debug.Log(entry.getWord()); } Debug.Log("testTwoEntriesWithSpecialSigns"); mw.print(); Debug.Log("Insert Second word: "); mw.insert("TestDictionary"); mw.print(); Debug.Log("........."); }
public DictEntrySingleWord(string word, int rate, DictEntryMultyWord previous) { this.rate = rate; this.word = word; this.previous = previous; }