(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
pspell_config_runtogether — 將連寫詞視為有效的複合詞
這個函數決定是否將連在一起的單詞視為合法的複合詞。也就是說,「thecat」將會是一個合法的複合詞,即使這兩個單詞之間應該要有一個空格。更改此設定只會影響 pspell_check() 返回的結果;pspell_suggest() 仍然會返回建議。
在呼叫 pspell_new_config() 之前,應該在設定上使用 pspell_config_runtogether()。
版本 | 說明 |
---|---|
8.1.0 | config 參數現在需要一個 PSpell\Config 實例;以前需要一個 資源。 |
範例 #1 pspell_config_runtogether()
<?php
$pspell_config = pspell_config_create("en");
pspell_config_runtogether($pspell_config, true);
$pspell = pspell_new_config($pspell_config);
pspell_check($pspell, "thecat");
?>