Package net.sf.okapi.steps.languagetool
Class LanguageTool
- java.lang.Object
-
- net.sf.okapi.steps.languagetool.LanguageTool
-
public class LanguageTool extends Object
-
-
Constructor Summary
Constructors Constructor Description LanguageTool(Parameters params, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale)Creates a LanguageTool object with a given set of options.LanguageTool(Parameters params, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale, List<net.sf.okapi.lib.terminology.ConceptEntry> terms, List<net.sf.okapi.lib.verification.BlackTerm> blackTerms)Load term and blackterm rules from in-memory lists rather than files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInitialized()voidrun(net.sf.okapi.common.resource.ITextUnit tu)Performs the proofreading of the text unit according to user selected options.voidsetTerms(List<net.sf.okapi.lib.terminology.ConceptEntry> terms, List<net.sf.okapi.lib.verification.BlackTerm> blackTerms)voidshutDown()
-
-
-
Constructor Detail
-
LanguageTool
public LanguageTool(Parameters params, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale) throws IOException
Creates a LanguageTool object with a given set of options.- Parameters:
params- the options to assign to this object (use null for the defaults).- Throws:
IOException
-
LanguageTool
public LanguageTool(Parameters params, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale, List<net.sf.okapi.lib.terminology.ConceptEntry> terms, List<net.sf.okapi.lib.verification.BlackTerm> blackTerms) throws IOException
Load term and blackterm rules from in-memory lists rather than files- Parameters:
params-sourceLocale-targetLocale-terms-blackTerms-- Throws:
IOException
-
-
Method Detail
-
setTerms
public void setTerms(List<net.sf.okapi.lib.terminology.ConceptEntry> terms, List<net.sf.okapi.lib.verification.BlackTerm> blackTerms) throws IOException
- Throws:
IOException
-
isInitialized
public boolean isInitialized()
-
shutDown
public void shutDown()
-
run
public void run(net.sf.okapi.common.resource.ITextUnit tu)
Performs the proofreading of the text unit according to user selected options.- Parameters:
tu- the unit to process.
-
-