Php/docs/function.pspell-config-runtogether

提供:Dev Guides
< Php
移動先:案内検索

pspell_config_runtogether

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

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


説明

pspell_config_runtogether ( int $config , bool $allow ) : bool

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

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


パラメータ

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


返り値

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


例1 pspell_config_runtogether()

<?php$pspell_config = pspell_config_create("en");pspell_config_runtogether($pspell_config, true);$pspell_link = pspell_new_config($pspell_config);pspell_check($pspell_link, "thecat");?>