Package org.omegat.core.dictionaries
Class DictionariesManager
- java.lang.Object
-
- org.omegat.core.dictionaries.DictionariesManager
-
- All Implemented Interfaces:
DirectoryMonitor.Callback
public class DictionariesManager extends java.lang.Object implements DirectoryMonitor.Callback
Class for load dictionaries.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IGNORE_FILE
-
Constructor Summary
Constructors Constructor Description DictionariesManager(IDictionaries pane)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDictionaryFactory(IDictionaryFactory dict)
Add dictionary factory.void
addIgnoreWord(java.lang.String word)
Add new ignore word.void
addOnlineDictionary(IDictionary dict)
Add online dictionary(dictionary without local data).boolean
doFuzzyMatching()
void
fileChanged(java.io.File file)
Executed on file changed.java.util.List<DictionaryEntry>
findWords(java.util.Collection<java.lang.String> words)
Find words list in all dictionaries.java.lang.String[]
getStemmedWords(java.lang.String word)
void
removeDictionaryFactory(IDictionaryFactory factory)
Remove dictionary Factory.void
removeOnlineDictionary(IDictionary dict)
Remove online dictionary.void
setIndexLanguage(Language indexLanguage)
void
setTokenizer(ITokenizer tokenizer)
void
start(java.io.File dictDir)
void
stop()
-
-
-
Field Detail
-
IGNORE_FILE
public static final java.lang.String IGNORE_FILE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DictionariesManager
public DictionariesManager(IDictionaries pane)
-
-
Method Detail
-
addDictionaryFactory
public void addDictionaryFactory(IDictionaryFactory dict)
Add dictionary factory.- Parameters:
dict
- factory to register.
-
removeDictionaryFactory
public void removeDictionaryFactory(IDictionaryFactory factory)
Remove dictionary Factory.- Parameters:
factory
- factory to unregister.
-
addOnlineDictionary
public void addOnlineDictionary(IDictionary dict)
Add online dictionary(dictionary without local data).- Parameters:
dict
- dictionary lookup driver.
-
removeOnlineDictionary
public void removeOnlineDictionary(IDictionary dict)
Remove online dictionary.- Parameters:
dict
- dictionary lookup driver to remove from registration.
-
start
public void start(java.io.File dictDir)
-
stop
public void stop()
-
fileChanged
public void fileChanged(java.io.File file)
Executed on file changed.- Specified by:
fileChanged
in interfaceDirectoryMonitor.Callback
-
addIgnoreWord
public void addIgnoreWord(java.lang.String word)
Add new ignore word.
-
findWords
public java.util.List<DictionaryEntry> findWords(java.util.Collection<java.lang.String> words)
Find words list in all dictionaries.- Parameters:
words
- words list- Returns:
- articles list
-
setIndexLanguage
public void setIndexLanguage(Language indexLanguage)
-
setTokenizer
public void setTokenizer(ITokenizer tokenizer)
-
doFuzzyMatching
public boolean doFuzzyMatching()
-
getStemmedWords
public java.lang.String[] getStemmedWords(java.lang.String word)
-
-