Class DictionaryServiceImpl
- java.lang.Object
-
- org.opencastproject.dictionary.hunspell.DictionaryServiceImpl
-
- All Implemented Interfaces:
org.opencastproject.dictionary.api.DictionaryService
public class DictionaryServiceImpl extends Object implements org.opencastproject.dictionary.api.DictionaryService
This dictionary service implementation passes the input text to the hunspell spell checker and returns its results.
-
-
Field Summary
Fields Modifier and Type Field Description static StringHUNSPELL_BINARY_CONFIG_KEYstatic StringHUNSPELL_COMMAND_CONFIG_KEY
-
Constructor Summary
Constructors Constructor Description DictionaryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opencastproject.metadata.mpeg7.TextualcleanUpText(String text)Filter the text according to the rules defined by the dictionary implementation used.StringgetBinary()StringgetCommand()LinkedList<String>runHunspell(String text)Run hunspell with text as input.voidsetBinary(String b)voidsetCommand(String c)
-
-
-
Field Detail
-
HUNSPELL_BINARY_CONFIG_KEY
public static final String HUNSPELL_BINARY_CONFIG_KEY
- See Also:
- Constant Field Values
-
HUNSPELL_COMMAND_CONFIG_KEY
public static final String HUNSPELL_COMMAND_CONFIG_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
setBinary
public void setBinary(String b)
-
getBinary
public String getBinary()
-
setCommand
public void setCommand(String c)
-
getCommand
public String getCommand()
-
runHunspell
public LinkedList<String> runHunspell(String text) throws Throwable
Run hunspell with text as input.- Throws:
Throwable
-
cleanUpText
public org.opencastproject.metadata.mpeg7.Textual cleanUpText(String text)
Filter the text according to the rules defined by the dictionary implementation used. This implementation will just let the whole text pass through.- Specified by:
cleanUpTextin interfaceorg.opencastproject.dictionary.api.DictionaryService- Returns:
- filtered text
-
-