Package org.omegat.core.spellchecker
Class AbstractSpellChecker
java.lang.Object
org.omegat.core.spellchecker.AbstractSpellChecker
- All Implemented Interfaces:
ISpellChecker
Abstract spell checker with method to handle ISpellCheckerProvider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()destroy the librarygetMisspelledTokens(String text) Get a list of misspelled tokens from the given text.voidignoreWord(String word) Add a word to the list of ignored wordsbooleanInitialize the library for the given project.booleanCheck the word.booleanisIgnoredWord(String word) Determine if the given word is on the ignored list.booleanisLearnedWord(String word) Determine if the given word is on the learned list.voidAdd a word to the list of correct wordsvoidSave the word lists to diskreturn a list of strings as suggestions
-
Constructor Details
-
AbstractSpellChecker
public AbstractSpellChecker()
-
-
Method Details
-
initialize
public boolean initialize()Initialize the library for the given project. Loads the lists of ignored and learned words for the project- Specified by:
initializein interfaceISpellChecker
-
destroy
public void destroy()destroy the library- Specified by:
destroyin interfaceISpellChecker
-
saveWordLists
public void saveWordLists()Save the word lists to disk- Specified by:
saveWordListsin interfaceISpellChecker
-
isCorrect
Check the word. If it is ignored or learned (valid), returns true. Otherwise, false.- Specified by:
isCorrectin interfaceISpellChecker
-
suggest
return a list of strings as suggestions- Specified by:
suggestin interfaceISpellChecker
-
ignoreWord
Add a word to the list of ignored words- Specified by:
ignoreWordin interfaceISpellChecker
-
learnWord
Add a word to the list of correct words- Specified by:
learnWordin interfaceISpellChecker
-
isIgnoredWord
Description copied from interface:ISpellCheckerDetermine if the given word is on the ignored list.- Specified by:
isIgnoredWordin interfaceISpellChecker
-
isLearnedWord
Description copied from interface:ISpellCheckerDetermine if the given word is on the learned list.- Specified by:
isLearnedWordin interfaceISpellChecker
-
getMisspelledTokens
Description copied from interface:ISpellCheckerGet a list of misspelled tokens from the given text.- Specified by:
getMisspelledTokensin interfaceISpellChecker
-