Currently, when users create a new LanguageTool custom rule we ingest the rule and wrap in a <rule> tag. This however doesn't allow users to add custom rule groups. To allow this, we now ingest the rule pre-wrapped in either a root <rule> or <rulegroup> tag, and add the id and name attributes into the root tag.
NOTE: The existing custom LT rules will need to be wrapped in <rule> or <rulegroup> at the same time that this PR is merged.
How to test
Run the branch locally and test. The CODE sheet is currently set up with wrapped rules for testing.
Test the two rulegroups and the individual rules against text with incorrect dates, ellipses and references to 'woman' or 'women' as adjectives to test the new rulegroups, e.g. "The 5th of October, January 3rd, 5th August 2017… three…four…five. There are women electricians."
How can we measure success?
Rule creators will be able to drop both rules and rule groups into the rules spreadsheet.
Have we considered potential risks?
Existing custom rules will need to be wrapped in <rule> or <rulegroup> tags in order to work in future.
What does this change?
Currently, when users create a new LanguageTool custom rule we ingest the rule and wrap in a
<rule>
tag. This however doesn't allow users to add custom rule groups. To allow this, we now ingest the rule pre-wrapped in either a root<rule>
or<rulegroup>
tag, and add theid
andname
attributes into the root tag.NOTE: The existing custom LT rules will need to be wrapped in
<rule>
or<rulegroup>
at the same time that this PR is merged.How to test
Run the branch locally and test. The CODE sheet is currently set up with wrapped rules for testing.
Test the two rulegroups and the individual rules against text with incorrect dates, ellipses and references to 'woman' or 'women' as adjectives to test the new rulegroups, e.g. "The 5th of October, January 3rd, 5th August 2017… three…four…five. There are women electricians."
How can we measure success?
Rule creators will be able to drop both rules and rule groups into the rules spreadsheet.
Have we considered potential risks?
Existing custom rules will need to be wrapped in
<rule>
or<rulegroup>
tags in order to work in future.