Back to LanguageTool Homepage - Privacy - Imprint

[en] Remove category MISC from grammar.xml?


(Mike Unwalla) #1

I would like to remove the category MISC and move each rule to a more specific category, as shown here:

Rule ID			Put in this category
OVERNIGHT		CONFUSED_WORDS
DESPITE_OF		GRAMMAR
ALSO_SENT_END		STYLE
PASSIVE_VOICE		STYLE
THE_EXACTLY_THE		GRAMMAR
DT_DT			GRAMMAR
DT_PRP			GRAMMAR
AN_ANOTHER		GRAMMAR
PHRASE_REPETITION	GRAMMAR
I_VE_A			NONSTANDARD_PHRASES
CD_00_O_CLOCK		NONSTANDARD_PHRASES

I cannot think of a reason not to move the rules and delete the category. But, because the change is large (delete a category), please tell me if you do not agree with my moving the rules and deleting the category.


(Daniel Naber) #2

If there are no rules in the category, it should disappear. Technically speaking, you cannot delete it because it is used for all languages, and several other languages will continue to use it. But moving rules out of that category sounds like a good plan.


(Mike Unwalla) #3

If I move the rules but do not remove the category, testrules gives an error that contains this information:

Caused by: org.xml.sax.SAXParseException; lineNumber: 13527; columnNumber: 16; cvc-complex-type.2.4.b: The content of element 'category' is not complete. One of '{rule, rulegroup}' is expected.


(Daniel Naber) #4

I see - you can remove the category from en/grammar.xml, as this won't affect other languages.


(Mike Unwalla) #5

Done (https://github.com/languagetool-org/languagetool/commit/37a02f67e2d077884e4f52ea38897e4b172a8a0d).