PHP Conference Japan 2024

enchant_dict_store_replacement

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0 )

enchant_dict_store_replacement新增單字的修正

描述

enchant_dict_store_replacement(EnchantDictionary $dictionary, 字串 $misspelled, 字串 $correct):

使用 'cor' 添加對 'mis' 的更正。請注意,您已將 @mis 替換為 @cor,因此未來 @mis 更有可能被 @cor 替換。這可能會提高 @cor 在建議列表中的排名。

參數

dictionary(字典)

enchant_broker_request_dict()enchant_broker_request_pwl_dict() 返回的 Enchant 字典。

misspelled(拼寫錯誤的詞)

要修正的詞

correct(正確的詞)

正確的詞

返回值

成功時返回 true,失敗時返回 false

更新日誌

版本 描述
8.0.0 dictionary 現在需要一個 EnchantDictionary 實例;先前需要的是一個 資源
新增筆記

使用者提供的筆記

此頁面沒有使用者提供的筆記。
To Top