I'm using aspell in an application where the user can, as usual, interactively choose corrections which may be stored (using aspell_speller_store_replacement).
I notice that there are some corrections, like tpyical misspellings, that one might want to do automatically in the future, whereas others, like untypical typos, or misspellings that could plausibly resolve to different words, should only be applied interactively (to avoid the kind of autocorrect errors we probably all know too well).
Of course, I want to leave the choice to the user. So I'm wondering if there's a way to store this choice (or in fact, any kind of options) along with replacements.
If not, I guess I could add some unique prefix, such as "tpyical -> AUTOCORRECT_typical", and when the result of aspell_speller_suggest contains a word with this prefix, use it automatically, otherwise present the list to the user as usual.
Is there any better way to achieve this?
I'm using aspell in an application where the user can, as usual, interactively choose corrections which may be stored (using aspell_speller_store_replacement).
I notice that there are some corrections, like tpyical misspellings, that one might want to do automatically in the future, whereas others, like untypical typos, or misspellings that could plausibly resolve to different words, should only be applied interactively (to avoid the kind of autocorrect errors we probably all know too well).
Of course, I want to leave the choice to the user. So I'm wondering if there's a way to store this choice (or in fact, any kind of options) along with replacements.
If not, I guess I could add some unique prefix, such as "tpyical -> AUTOCORRECT_typical", and when the result of aspell_speller_suggest contains a word with this prefix, use it automatically, otherwise present the list to the user as usual.
Is there any better way to achieve this?