public class LanguageToolNetworkBridge extends BaseLanguageToolBridge
Constructor and Description |
---|
LanguageToolNetworkBridge(Language sourceLang,
Language targetLang,
java.lang.String url)
Get instance talking to remote server
|
LanguageToolNetworkBridge(Language sourceLang,
Language targetLang,
java.lang.String path,
int port)
Get instance spawning and talking to local server
|
Modifier and Type | Method and Description |
---|---|
void |
applyRuleFilters(java.util.Set<java.lang.String> disabledCategories,
java.util.Set<java.lang.String> disabledRules,
java.util.Set<java.lang.String> enabledRules)
Free resources before destruction
|
protected java.util.List<LanguageToolResult> |
getCheckResultsImpl(java.lang.String sourceText,
java.lang.String translationText) |
protected java.util.List<java.lang.Object> |
getSupportedLanguages() |
void |
stop()
Handle project or application closing
|
getCheckResults
public LanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String url) throws java.lang.Exception
url
- URL of remote LanguageTool serverjava.lang.Exception
public LanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String path, int port) throws java.lang.Exception
path
- local LanguageTool directoryport
- local port for spawned server to listenjava.lang.Exception
public void stop()
ILanguageToolBridge
public void applyRuleFilters(java.util.Set<java.lang.String> disabledCategories, java.util.Set<java.lang.String> disabledRules, java.util.Set<java.lang.String> enabledRules)
ILanguageToolBridge
disabledCategories
- Comma-separated list of disabled category IDsdisabledRules
- Comma-separated list of disabled rule IDsenabledRules
- Comma-separated list of enabled rule IDsprotected java.util.List<LanguageToolResult> getCheckResultsImpl(java.lang.String sourceText, java.lang.String translationText) throws java.lang.Exception
getCheckResultsImpl
in class BaseLanguageToolBridge
java.lang.Exception
protected java.util.List<java.lang.Object> getSupportedLanguages() throws java.lang.Exception
java.lang.Exception