Here I am creating my personal word list
$pspell_config = pspell_config_create("es");
pspell_config_personal($pspell_config, "MyWords");
$pspell_link = pspell_new_config($pspell_config);
pspell_add_to_personal($pspell_link, "malija");
pspell_add_to_personal($pspell_link, "baliza");
pspell_add_to_personal($pspell_link, "valija");
pspell_save_wordlist($pspell_link);
Here I build a suggestion list for the 'not found' word 'baliza'.
$pspell_link = pspell_new_personal ("MyWords","es", "", "", "", PSPELL_FAST);
if (!pspell_check($pspell_link, "balija")) {
$suggestions = pspell_suggest($pspell_link, "balija");
foreach ($suggestions as $suggestion) {
echo "Possible spelling: $suggestion<br />";
}
}
Added words are also suggest.
What I am looking for is how can I ONLY get suggestions from MyWords file.
I don't want to suggest words from the dictionary that are not in my database.
Thank you.