(PHP 4 >= 4.0.2)
pspell_store_replacement -- 単語を置換するものを保存する
説明
int
pspell_store_replacement ( int dictionary_link, string misspelled, string correct)
pspell_store_replacement() は、単語の置換候補
を保存します。これにより、この後の
pspell_suggest()では、置換候補を返すことが可能
となります。この関数の利点を活かすためには、辞書をオープンする際
にpspell_new_personal()を使用する必要がありま
す。置換候補を恒久的に保存するためには、
pspell_config_personal()を使用する必要があり、
pspell_config_repl()によりカスタム単語リストを
保存するパスを設定し、この後、変更点をディスクへ書き込むために
pspell_save_wordlist()を使用する必要があります。
この関数は、pspell .11.2 および aspell .32.5 以降でない限り動作し
ないことに注意して下さい。
例 1pspell_store_replacement() $pspell_config = pspell_config_create ("en");
pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl");
$pspell_link = pspell_new_config ($pspell_config);
pspell_store_replacement ($pspell_link, $misspelled, $correct);
pspell_save_wordlist ($pspell_link); |
|