Package org.languagetool.commandline
Class CommandLineOptions
- java.lang.Object
-
- org.languagetool.commandline.CommandLineOptions
-
public class CommandLineOptions extends java.lang.ObjectOptions that can be set via command line arguments.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandLineOptions.OutputFormatConstants for rule matches output in command-line.
-
Field Summary
Fields Modifier and Type Field Description private booleanapplySuggestionsprivate booleanautoDetectprivate booleanbitextprivate @Nullable java.lang.StringbitextRuleFileprivate java.util.Set<org.languagetool.rules.CategoryId>disabledCategoriesprivate java.util.List<java.lang.String>disabledRulesprivate java.util.Set<org.languagetool.rules.CategoryId>enabledCategoriesprivate java.util.List<java.lang.String>enabledRulesprivate @Nullable java.lang.Stringencodingprivate @Nullable java.lang.StringfalseFriendFileprivate @Nullable java.io.FilefasttextBinaryprivate @Nullable java.io.FilefasttextModelprivate @Nullable java.lang.Stringfilenameprivate @Nullable org.languagetool.Languagelanguageprivate @Nullable java.io.FilelanguageModelprivate booleanlineByLineprivate booleanlistUnknownprivate @Nullable org.languagetool.LanguagemotherTongueprivate @Nullable java.io.FileneuralNetworkModelprivate CommandLineOptions.OutputFormatoutputFormatprivate booleanprintLanguagesprivate booleanprintUsageprivate booleanprintVersionprivate booleanprofileprivate booleanrecursiveprivate @Nullable java.lang.StringruleFileprivate booleansingleLineBreakMarksParagraphprivate booleantaggerOnlyprivate booleanuseEnabledOnlyprivate booleanverboseprivate @Nullable java.io.Fileword2vecModelprivate booleanxmlFiltering
-
Constructor Summary
Constructors Constructor Description CommandLineOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetBitextRuleFile()java.util.Set<org.languagetool.rules.CategoryId>getDisabledCategories()java.util.List<java.lang.String>getDisabledRules()java.util.Set<org.languagetool.rules.CategoryId>getEnabledCategories()java.util.List<java.lang.String>getEnabledRules()@Nullable java.lang.StringgetEncoding()@Nullable java.lang.StringgetFalseFriendFile()@Nullable java.io.FilegetFasttextBinary()@Nullable java.io.FilegetFasttextModel()@Nullable java.lang.StringgetFilename()@Nullable org.languagetool.LanguagegetLanguage()@Nullable java.io.FilegetLanguageModel()@Nullable org.languagetool.LanguagegetMotherTongue()@Nullable java.io.FilegetNeuralNetworkModel()@Nullable java.lang.StringgetRuleFile()@Nullable java.io.FilegetWord2VecModel()booleanisApplySuggestions()booleanisAutoDetect()booleanisBitext()booleanisJsonFormat()booleanisLineByLine()booleanisListUnknown()booleanisPrintLanguages()booleanisPrintUsage()booleanisPrintVersion()booleanisProfile()booleanisRecursive()booleanisSingleLineBreakMarksParagraph()booleanisTaggerOnly()booleanisUseEnabledOnly()booleanisVerbose()booleanisXmlFiltering()booleanisXmlFormat()voidsetApplySuggestions(boolean applySuggestions)voidsetAutoDetect(boolean autoDetect)voidsetBitext(boolean bitext)voidsetBitextRuleFile(java.lang.String bitextRuleFile)voidsetDisabledCategories(java.util.List<java.lang.String> categoryIds)voidsetDisabledRules(java.util.List<java.lang.String> disabledRules)voidsetEnabledCategories(java.util.List<java.lang.String> categoryIds)voidsetEnabledRules(java.util.List<java.lang.String> enabledRules)voidsetEncoding(java.lang.String encoding)voidsetFalseFriendFile(java.lang.String file)voidsetFasttextBinary(java.io.File fasttextBinary)voidsetFasttextModel(java.io.File fasttextModel)voidsetFilename(java.lang.String filename)voidsetJsonFormat()voidsetLanguage(org.languagetool.Language language)voidsetLanguageModel(java.io.File languageModel)voidsetLineByLine(boolean lineByLine)voidsetListUnknown(boolean listUnknown)voidsetMotherTongue(org.languagetool.Language motherTongue)voidsetNeuralNetworkModel(java.io.File neuralNetworkModel)voidsetPrintLanguages(boolean printLanguages)voidsetPrintUsage(boolean printUsage)voidsetPrintVersion(boolean printVersion)voidsetProfile(boolean profile)voidsetRecursive(boolean recursive)voidsetRuleFile(java.lang.String ruleFile)voidsetSingleLineBreakMarksParagraph(boolean singleLineBreakMarksParagraph)voidsetTaggerOnly(boolean taggerOnly)voidsetUseEnabledOnly()voidsetVerbose(boolean verbose)voidsetWord2VecModel(java.io.File neuralNetworkLanguageModel)voidsetXmlFiltering(boolean xmlFiltering)voidsetXmlFormat()
-
-
-
Field Detail
-
enabledCategories
private final java.util.Set<org.languagetool.rules.CategoryId> enabledCategories
-
disabledCategories
private final java.util.Set<org.languagetool.rules.CategoryId> disabledCategories
-
printUsage
private boolean printUsage
-
printVersion
private boolean printVersion
-
printLanguages
private boolean printLanguages
-
verbose
private boolean verbose
-
recursive
private boolean recursive
-
taggerOnly
private boolean taggerOnly
-
singleLineBreakMarksParagraph
private boolean singleLineBreakMarksParagraph
-
outputFormat
private CommandLineOptions.OutputFormat outputFormat
-
listUnknown
private boolean listUnknown
-
applySuggestions
private boolean applySuggestions
-
profile
private boolean profile
-
bitext
private boolean bitext
-
autoDetect
private boolean autoDetect
-
xmlFiltering
private boolean xmlFiltering
-
lineByLine
private boolean lineByLine
-
language
@Nullable private @Nullable org.languagetool.Language language
-
motherTongue
@Nullable private @Nullable org.languagetool.Language motherTongue
-
languageModel
@Nullable private @Nullable java.io.File languageModel
-
word2vecModel
@Nullable private @Nullable java.io.File word2vecModel
-
neuralNetworkModel
@Nullable private @Nullable java.io.File neuralNetworkModel
-
fasttextModel
@Nullable private @Nullable java.io.File fasttextModel
-
fasttextBinary
@Nullable private @Nullable java.io.File fasttextBinary
-
encoding
@Nullable private @Nullable java.lang.String encoding
-
filename
@Nullable private @Nullable java.lang.String filename
-
disabledRules
private java.util.List<java.lang.String> disabledRules
-
enabledRules
private java.util.List<java.lang.String> enabledRules
-
useEnabledOnly
private boolean useEnabledOnly
-
ruleFile
@Nullable private @Nullable java.lang.String ruleFile
-
falseFriendFile
@Nullable private @Nullable java.lang.String falseFriendFile
-
bitextRuleFile
@Nullable private @Nullable java.lang.String bitextRuleFile
-
-
Method Detail
-
isPrintUsage
public boolean isPrintUsage()
-
setPrintUsage
public void setPrintUsage(boolean printUsage)
-
isPrintVersion
public boolean isPrintVersion()
-
setPrintVersion
public void setPrintVersion(boolean printVersion)
-
isVerbose
public boolean isVerbose()
-
setVerbose
public void setVerbose(boolean verbose)
-
isLineByLine
public boolean isLineByLine()
-
setLineByLine
public void setLineByLine(boolean lineByLine)
-
isRecursive
public boolean isRecursive()
-
setRecursive
public void setRecursive(boolean recursive)
-
isTaggerOnly
public boolean isTaggerOnly()
-
setTaggerOnly
public void setTaggerOnly(boolean taggerOnly)
-
isSingleLineBreakMarksParagraph
public boolean isSingleLineBreakMarksParagraph()
-
setSingleLineBreakMarksParagraph
public void setSingleLineBreakMarksParagraph(boolean singleLineBreakMarksParagraph)
-
isXmlFormat
public boolean isXmlFormat()
- Since:
- 3.6
-
setXmlFormat
public void setXmlFormat()
- Since:
- 3.6
-
isJsonFormat
public boolean isJsonFormat()
- Since:
- 3.6
-
setJsonFormat
public void setJsonFormat()
- Since:
- 3.6
-
isListUnknown
public boolean isListUnknown()
-
setListUnknown
public void setListUnknown(boolean listUnknown)
-
isApplySuggestions
public boolean isApplySuggestions()
-
setApplySuggestions
public void setApplySuggestions(boolean applySuggestions)
-
isProfile
public boolean isProfile()
-
setProfile
public void setProfile(boolean profile)
-
isBitext
public boolean isBitext()
-
setBitext
public void setBitext(boolean bitext)
-
isAutoDetect
public boolean isAutoDetect()
-
setAutoDetect
public void setAutoDetect(boolean autoDetect)
-
getLanguage
@Nullable public @Nullable org.languagetool.Language getLanguage()
-
setLanguage
public void setLanguage(org.languagetool.Language language)
-
getMotherTongue
@Nullable public @Nullable org.languagetool.Language getMotherTongue()
-
setMotherTongue
public void setMotherTongue(org.languagetool.Language motherTongue)
-
getLanguageModel
@Nullable public @Nullable java.io.File getLanguageModel()
- Returns:
- a directory with Lucene index sub directories like (
3grams), ornull - Since:
- 2.7
-
setLanguageModel
public void setLanguageModel(java.io.File languageModel)
- Since:
- 2.7
-
getWord2VecModel
@Nullable public @Nullable java.io.File getWord2VecModel()
- Returns:
- a directory with a word2vec language model for use with neural network rules in sub directories like (
en), ornull - Since:
- 4.0
-
setWord2VecModel
public void setWord2VecModel(java.io.File neuralNetworkLanguageModel)
- Since:
- 4.0
-
getNeuralNetworkModel
@Nullable public @Nullable java.io.File getNeuralNetworkModel()
- Since:
- 4.4
-
setNeuralNetworkModel
public void setNeuralNetworkModel(java.io.File neuralNetworkModel)
- Since:
- 4.4
-
getFasttextModel
@Nullable public @Nullable java.io.File getFasttextModel()
- Since:
- 4.3
-
setFasttextModel
public void setFasttextModel(java.io.File fasttextModel)
- Since:
- 4.3
-
getFasttextBinary
@Nullable public @Nullable java.io.File getFasttextBinary()
- Since:
- 4.3
-
setFasttextBinary
public void setFasttextBinary(java.io.File fasttextBinary)
- Since:
- 4.3
-
getRuleFile
@Nullable public @Nullable java.lang.String getRuleFile()
- Returns:
- an additional rule file name to use
- Since:
- 2.9
-
setRuleFile
public void setRuleFile(java.lang.String ruleFile)
- Parameters:
ruleFile- absolute file name of the XML rule file- Since:
- 2.9
-
getEncoding
@Nullable public @Nullable java.lang.String getEncoding()
-
setEncoding
public void setEncoding(java.lang.String encoding)
-
getFilename
@Nullable public @Nullable java.lang.String getFilename()
-
setFilename
public void setFilename(java.lang.String filename)
-
getDisabledRules
public java.util.List<java.lang.String> getDisabledRules()
-
setDisabledRules
public void setDisabledRules(java.util.List<java.lang.String> disabledRules)
-
getEnabledRules
public java.util.List<java.lang.String> getEnabledRules()
-
setEnabledRules
public void setEnabledRules(java.util.List<java.lang.String> enabledRules)
-
setEnabledCategories
public void setEnabledCategories(java.util.List<java.lang.String> categoryIds)
- Since:
- 3.3
-
getEnabledCategories
public java.util.Set<org.languagetool.rules.CategoryId> getEnabledCategories()
- Since:
- 3.3
-
setDisabledCategories
public void setDisabledCategories(java.util.List<java.lang.String> categoryIds)
- Since:
- 3.3
-
getDisabledCategories
public java.util.Set<org.languagetool.rules.CategoryId> getDisabledCategories()
- Since:
- 3.3
-
isUseEnabledOnly
public boolean isUseEnabledOnly()
- Since:
- 2.9
-
setUseEnabledOnly
public void setUseEnabledOnly()
- Since:
- 2.7
-
isXmlFiltering
public boolean isXmlFiltering()
-
setXmlFiltering
public void setXmlFiltering(boolean xmlFiltering)
-
isPrintLanguages
public boolean isPrintLanguages()
-
setPrintLanguages
public void setPrintLanguages(boolean printLanguages)
-
setFalseFriendFile
public void setFalseFriendFile(java.lang.String file)
- Parameters:
file- False friends filename- Since:
- 2.9
-
getFalseFriendFile
@Nullable public @Nullable java.lang.String getFalseFriendFile()
- Returns:
- False friends file name or
null - Since:
- 2.9
-
getBitextRuleFile
@Nullable public @Nullable java.lang.String getBitextRuleFile()
- Returns:
- the bitext rule file name or
null - Since:
- 2.9
-
setBitextRuleFile
public void setBitextRuleFile(java.lang.String bitextRuleFile)
- Parameters:
bitextRuleFile- the bitext rule file name- Since:
- 2.9
-
-