Previous: , Up: Writing programs to use Aspell   [Contents]


6.3 Notes on Storing Replacement Pairs

The store_repl method and the $$ra should be used because Aspell is able to learn from users misspellings. For example on the first pass a user misspells beginning as beging so Aspell suggests:

begging, begin, being, Beijing, bagging, ….

However the user then tries begning and Aspell suggests

beginning, beaning, begging, …

so the user selects beginning. However, later on in the document the user misspells it as begng (not beging). Normally Aspell will suggest.

began, begging, begin, begun, …

However because it knows the user misspelled beginning as beging it will instead suggest:

beginning, began, begging, begin, begun …

I myself often misspelled beginning (and still do) as something close to begging and too many times wind up writing sentences such as "begging with …".

Please also note that replacements commands have a memory. Which means if you first store the replacement pair:

sicolagest -> psycolagest

then store the replacement pair

psycolagest -> psychologist

The replacement pair

sicolagest -> psychologist

will also get stored so that you don’t have to worry about it.