Esempio n. 1
0
  public void removeWord(String word) {
    String key = language.removeDiacritics(word);
    words.remove(key);

    addedwords.remove(key);
    removedwords.add(key);

    dictFrame.writeDictArea("Word removed: ", false);
    dictFrame.writeDictArea(word, false);
    dictFrame.writeDictArea("\n", false);
    dictFrame.scrollEnd();
    dictFrame.isModified(true);
  }
Esempio n. 2
0
  public void removeStem(String word) {
    String key = language.removeDiacritics(word);
    stems.remove(key);

    addedstems.remove(key);
    removedstems.add(key);

    dictFrame.writeDictArea("Stem removed: ", false);
    dictFrame.writeSelectDictArea(word);
    dictFrame.writeDictArea("\n", false);
    dictFrame.scrollEnd();
    dictFrame.isModified(true);
  }
Esempio n. 3
0
 public String correctWordByDictionary(String word) {
   if (words.containsKey(word)) {
     String correctedWord = words.get(word);
     if (matchInfo) {
       dictFrame.writeDictArea(word + " >> ", false);
       dictFrame.writeSelectDictArea(correctedWord);
       dictFrame.writeDictArea("\n", false);
       dictFrame.scrollEnd();
     }
     return correctedWord;
   } else {
     return word;
   }
 }
Esempio n. 4
0
  public void addStem(String word) {
    String key = language.removeDiacritics(word);
    if (validCharacters(key)) {
      stems.put(key, word);

      removedstems.remove(key);
      addedstems.add(key);

      dictFrame.writeDictArea("Stem added: ", false);
      dictFrame.writeSelectDictArea(word);
      dictFrame.writeDictArea("\n", false);
      dictFrame.scrollEnd();
      dictFrame.isModified(true);
    }
  }
Esempio n. 5
0
  public void printModifications() {
    dictFrame.writeDictArea("\nDICTIONARY MODIFICATIONS\n", false);
    if (!addedwords.isEmpty()) {
      dictFrame.writeDictArea("WORDS ADDED\n", false);
      printEntryList(addedwords, words);
    }
    if (!removedwords.isEmpty()) {
      dictFrame.writeDictArea("WORDS REMOVED\n", false);
      printEntryList(removedwords, words);
    }
    if (!addedstems.isEmpty()) {
      dictFrame.writeDictArea("STEMS ADDED\n", false);
      printEntryList(addedstems, stems);
    }
    if (!removedstems.isEmpty()) {
      dictFrame.writeDictArea("STEMS REMOVED\n", false);
      printEntryList(removedstems, stems);
    }

    dictFrame.scrollEnd();
  }