Configuring a Custom Rule
Select the list to which you want to add a rule, then click the button in the toolbar.
-
AB1234567
Trigger word or text
In the first text field at the top of the panel, enter the word or text that will trigger the rule. A search results menu will list suggestions corresponding to the string of characters you have typed. Apart from the text-based suggestion (which represents the typed string), the syntactic category of each word is indicated and an extract from its definition is displayed below to help you make a choice.
- Words in the search list appear in green if they correspond with the search string, in blue if a word occurs in your personal dictionaries or in black for all other cases.
Variable trigger
If the trigger word has more than one inflected form (nouns, adjectives, etc.) or if it has variants (adapter, adaptor), specify the forms that will trigger the rule. By default, the corrector will detect all forms. If needed, uncheck any word forms you do not want the corrector to detect.
- In the case of verbs, all conjugated forms will activate the rule.
- Inflected forms are not displayed for textual triggers.
Textual trigger
The last item in the search results menu always includes the note Text. This note means that the corrector will activate the rule if it comes across text that matches the typed string of characters exactly. Textual triggers can be useful for complex expressions that are not included in Antidote’s dictionaries, such as a trademark or a company name.
- The note text appears next to textual triggers in your list of custom rules.
Case sensitivity
When case (capital or lowercase letters) is important for a textual trigger, click the Aa toggle to enable case-sensitive detection. By default, rules are not case-sensitive.
Language menu
For textual triggers, specify which language the rule should apply to (if your Antidote supports two languages).
Detection type: alert or correction
A rule can trigger an alert (thin underlining) or a correction (thick underlining). An alert is like a warning: it aims to draw your attention to the trigger text or word without necessarily replacing it with something else. A correction means that the trigger word or text should be replaced; correction rules must include a replacement word or text.
- Custom rules are underlined in purple. They are easily distinguished from Antidote’s built-in alerts (underlined in orange) or corrections (underlined in red). Purple is also used in the corrector’s list of detections and in the statistical filter of error types, bringing your custom detections to the forefront.
- Your list of rules clearly distinguishes alerts (indicated as Alert) from corrections (arrow followed by the recommended replacement).
Replacement
If the rule triggers a correction, specify the replacement word or text in the Replace with… text field. A search results menu will list suggestions corresponding to the string of characters you have typed. Apart from the last item in the list (which represents the typed string), the syntactic category of each word is indicated and an extract from its definition is displayed below to help you make a choice.
- The replacement word or text must belong to the same syntactic category as the word or text that triggers the rule. If it does not, analysis of the sentence may fail once the replacement has been inserted. If their categories do not match, Antidote will ask you to select another replacement word.
When Antidote’s corrector detects the trigger word or text, a tooltip will recommend substituting it with your chosen replacement. You are free to accept or reject the correction.
If your recommended replacement is a word that Antidote knows, the replacement’s grammatical agreement will match that of the original text (number, person, tense, mood, etc.). For example, if your replacement word is nice, adj., the corrector will insert nice, nicer or nicest according to the original context.
If you choose to go with the list option labelled Text, the corrector will simply suggest the selected replacement text, regardless of the trigger word or text’s original grammatical agreement. So, if the replacement text is nice, text, the corrector will always suggest nice as a replacement.
- The detection for a correction with replacement text resembles a detection requiring manual correction (thick dotted underlining). In this case, a Replace command appears in the tooltip for the correction.
- For textual triggers, the replacement is strictly textual (i.e. a simple string without any additional context).
Tooltip title
Give a title to the tooltip that will accompany your detection by selecting it from Antidote’s suggestions or by creating your own. This title will be displayed in purple before the explanation and, for alerts, also in grey in the upper left-hand corner of the tooltip.
Tooltip explanation
Write the explanation for your rule in this field or keep the one suggested by Antidote. This is the explanation that will be displayed in the tooltip when a rule is triggered. Use the and buttons at the bottom of the text field to put selected text in bold and in italics respectively. The button can be used to add a link to a web page.
- When a rule generates a detection, the explanation in the tooltip is followed by a See the rule link. Click it to open the rule in question and edit, if needed.
- The explanation has a 500-character limit for consistency with Antidote’s own corrections.
Correct and incorrect examples
Add correct and incorrect usage examples to your rules to make them easier to implement. These examples are displayed directly in the rule’s tooltip when it is triggered in the corrector. Click the button in the Examples field to add a usage example and indicate whether it is correct or incorrect by selecting the relevant option in the menu to the right. These examples will be shown in the corrector tooltip when the rule is triggered.
- In the tooltip, correct examples are shown with a icon, and incorrect examples are shown with a icon.
You can edit your examples by double-clicking the corresponding text or delete them by clicking the button at the bottom of the Examples field.
Other triggers
If you want a rule to be triggered by strings similar to the main textual trigger, you can add other triggers by clicking the button at the bottom of the Other trigger texts window and entering the new textual trigger. The same correction as the main trigger is applied by default, but you can edit it in the text field to use a different correction.
You can edit your triggers or their corrections by double-clicking on the text in the right-hand panel of the customizations. To delete a trigger, simply select it and click on the button at the bottom of the window.