Back to LanguageTool Homepage - Privacy - Imprint

Using --enablecategories with LanguageTool CLI


#1

I'm confused about the usage of --enablecategories in the LanguageTool CLI. If I'm understanding the documentation correctly, if I supply a Category ID to this option, then all rules in that category will be enabled. So, if I enable the category "MISC", LanguageTool should enable "PASSIVE_VOICE" as it belongs to "MISC". But the following two commands give entirely different results:

echo 'He is said to have been happy.' |
java -jar /opt/LanguageTool-3.3/languagetool-commandline.jar -l en --enablecategories MISC

(This doesn't catch the passive voice in the sentence.)

echo 'He is said to have been happy.' |
java -jar /opt/LanguageTool-3.3/languagetool-commandline.jar -l en -e PASSIVE_VOICE --enablecategories MISC

(This catches the passive voice as expected.)

Is this a bug?

P.S. Thank you for developing LanguageTool!


(Daniel Naber) #2

PASSIVE_VOICE is a special case as it's off by default. These rules (very few) always have to enabled explicitly.


#3

Thanks! Is there a list of rules which are enabled by default, or a list of rules that I need to enable explicitly?


(Daniel Naber) #4

You can search the grammar.xml file for default="off" to find the rules disabled by default. Usually they are disabled for a reason, though.


#5

Thanks a lot!


Here are the rules I found (if someone else requires it):

And
AND_ALSO
ARE_ABLE_TO
ARTICLE_MISSING
AS_FAR_AS_X_IS_CONCERNED
BEST_EVER
BLEND_TOGETHER
BRIEF_MOMENT
CAN_NOT
CANT_HELP_BUT
COMMA_WHICH
EG_NO_COMMA
ELLIPSIS
EXACT_SAME
HONEST_TRUTH
HOPEFULLY
IE_NO_COMMA
IN_ORDER_TO
I_VE_A
NEGATE_MEANING
PASSIVE_VOICE
PLAIN_ENGLISH
REASON_WHY
SENT_START_NUM
SERIAL_COMMA_OFF
SERIAL_COMMA_ON
SMARTPHONE
THREE_NN
TIRED_INTENSIFIERS
USELESS_THAT
WIKIPEDIA
WORLD_AROUND_IT