Influencing the Word Corrector Lexicon Algorithm
Example: You add your product names in the bias file to ensure your products are suggested when a client misspelled them in the search box of your e-commerce site. Before your changes, the Did you Mean feature was only suggesting common English words with a high degree of similarity.
To influence the Word Corrector Lexicon Algorithm
Ensure your CES index meets the requirements of the Query Correction feature (see Query Correction Feature).
List the DidYouMean suggested terms that you want to influence along with their number of occurrences in your index.
Tip: You can misspell one or two letters in important concepts for your organization and ensure the DidYouMean suggestions are correct.
Create a WordCorrectorBias.txt file that respects the following format:
Note: The numbers (n) next to the terms represent the bias in absolute numbers of occurrence in the lexicon. A negative value will decrease the number of occurrences and thus reduce the chance of seeing the term as a DidYouMean suggestion. A positive value will, on the contrary, enforce the term as a possible suggestion. The number of occurrences to add or subtract is dependent on the index content.
Example: You want to make sure that a query containing the "verison" typo does not suggest "version", but "Verizon", so you enter the following:
In the CES 7 config.txt file (located in the C:\CES7\Config folder), in the PhysicalIndex section, add the WordCorrectorBiasFilePath tag with the path to the WordCorrectorBias.txt file.
Note: You can also make the algorithm outputs suggestions containing ligated characters, which is impossible otherwise, since the index does not contain any ligated character.
Example: To make the index outputs the "Œsophage" suggestion, you add the term with a bias of 0 (for the term to have the same number of occurrences as "oesophage"):
Restart the CES service.
Once you are satisfied with your bias file, rebuild the Word Corrector Lexicon to make sure the WordCorrectorBias.txt file is used:
On the Coveo server, access the Administration Tool (see Opening the Administration Tool).
Select Index > Advanced.
In the Advanced page, click Rebuild Word Corrector Lexicon.