Package org.omegat.core.spellchecker
Class DictionaryManager
- java.lang.Object
-
- org.omegat.core.spellchecker.DictionaryManager
-
public class DictionaryManager extends java.lang.Object
Dictionary manager. Spell checking dictionaries' utility functions.
-
-
Constructor Summary
Constructors Constructor Description DictionaryManager(java.io.File dir)
Creates a new instance of DictionaryManager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getDictionaryNameList(java.util.List<java.lang.String> aList)
returns a list of full names of dictionaries from a dictionary code listjava.lang.String
getDirectory()
returns the dictionary directoryjava.util.List<java.lang.String>
getInstallableDictionaryCodeList()
returns a list of codes (xx_YY) of installable dictionariesjava.util.List<java.lang.String>
getInstallableDictionaryNameList()
return a list of names of installable dictionaries (e.g.java.util.List<java.lang.String>
getLocalDictionaryCodeList()
returns a list of available dictionaries in the xx_YY formjava.util.List<java.lang.String>
getLocalDictionaryNameList()
return a list of full names of the local dictionariesvoid
installRemoteDictionary(java.lang.String langCode)
installs a remote dictionary by downloading the corresponding zip file from the net and by installing the aff and dic file to the dictionary directory.boolean
uninstallDictionary(java.lang.String lang)
Uninstall (delete) a given dictionary from the dictionary directory
-
-
-
Method Detail
-
getDirectory
public java.lang.String getDirectory()
returns the dictionary directory
-
getDictionaryNameList
public java.util.List<java.lang.String> getDictionaryNameList(java.util.List<java.lang.String> aList)
returns a list of full names of dictionaries from a dictionary code list
-
getLocalDictionaryNameList
public java.util.List<java.lang.String> getLocalDictionaryNameList()
return a list of full names of the local dictionaries
-
getLocalDictionaryCodeList
public java.util.List<java.lang.String> getLocalDictionaryCodeList()
returns a list of available dictionaries in the xx_YY form
-
uninstallDictionary
public boolean uninstallDictionary(java.lang.String lang)
Uninstall (delete) a given dictionary from the dictionary directory- Parameters:
lang
- : the language code (xx_YY) of the dictionary to be deleted
-
getInstallableDictionaryNameList
public java.util.List<java.lang.String> getInstallableDictionaryNameList() throws java.io.IOException
return a list of names of installable dictionaries (e.g. en_US - english (USA))- Throws:
java.io.IOException
-
getInstallableDictionaryCodeList
public java.util.List<java.lang.String> getInstallableDictionaryCodeList() throws java.io.IOException
returns a list of codes (xx_YY) of installable dictionaries- Throws:
java.io.IOException
-
installRemoteDictionary
public void installRemoteDictionary(java.lang.String langCode) throws java.io.IOException
installs a remote dictionary by downloading the corresponding zip file from the net and by installing the aff and dic file to the dictionary directory.- Parameters:
langCode
- : the language code (xx_YY)- Throws:
java.io.IOException
-
-