(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
pspell_config_repl — 設定包含取代配對的檔案
設定包含取代配對的檔案。
取代配對可以提升拼寫檢查器的品質。當一個單字拼錯,且在列表中找不到合適的建議時,可以使用 pspell_store_replacement() 儲存取代配對,然後使用 pspell_save_wordlist() 儲存單字列表以及取代配對。
在呼叫 pspell_new_config() 之前,應該在配置上使用 pspell_config_repl()。
版本 | 說明 |
---|---|
8.1.0 | config 參數現在需要一個 PSpell\Config 實例;先前需要的是一個 資源。 |
範例 #1 pspell_config_repl()
<?php
$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 = pspell_new_config($pspell_config);
pspell_check($pspell, "thecat");
?>
注意事項:
除非您擁有 pspell .11.2 和 aspell .32.5 或更高版本,否則此函數將無法運作。