Antidote User Guide

User Guide / Customizations / Custom Rules / Configuring a Rule

Configuring a Custom Rule

Select the list to which you want to add a rule, then click the button in the toolbar.

A
B
1
2
3
4
5
6

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 first 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.

Textual trigger

The firstlast 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 firstlast 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

Clicking on the button in the Examples field allows you to add correct and incorrect examples of the trigger or its correction. 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. Simply click Examples after the explanation to display them.

  • 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 on the text in the right-hand panel of the customizations window. To delete an example, simply select it and click on the button at the bottom of the window.

Other triggers

Clicking the button at the bottom of the Other trigger texts window allows you to add other triggers to your rule. You may keep the same correction as the main trigger, or edit it in the text zone.

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.