« pspell_config_repl
pspell_config_save_repl »

pspell_config_runtogether

(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)

pspell_config_runtogether — 複合語を有効な単語の組み合わせとして考慮する

説明

function pspell_config_runtogether(PSpell\Config $config, bool $allow): bool

この関数は、複合語を正しい複合語として処理するかどうかを定義します。 つまり、"thecat" には、二つの単語の間に空白はありませんが、 正しい複合語となります。この設定の変更は、 pspell_check() による戻り値にのみ影響を与えます。 pspell_suggest() は、この場合でも修正候補を返します。

pspell_config_runtogether() は、 pspell_new_config() をコールする前に設定を行うために使用する必要があります。

パラメータ

config

PSpell\Config クラスのインスタンス。

allow

連続した単語を複合語として扱う場合な true、 それ以外の場合は false。

戻り値

成功した場合に true を、失敗した場合に false を返します。

変更履歴

バージョン 説明
8.1.0 引数 config は、PSpell\Config クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、resource を期待していました。

例

例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");
?>

関連キーワード:
pspell   config   複合語   runtogether   単語   組み合わせ   考慮   PSpell   Config   repl   allow   thecat   check   インスタンス   期待   save   Pspell   空白   影響   suggest   修正   候補   連続   成功   履歴
関連する関数・ページ:
function.pspell-config-ignore   function.pspell-config-save-repl   book.pspell   function.pspell-new-config   function.pspell-config-dict-dir   function.pspell-config-personal