pspell_suggest
単語のスペルについて修正候補を示す
説明
arrayfalse pspell_suggest(PSpell\Dictionary $dictionary, string $word)
pspell_suggest は、
指定した単語について可能性のあるスペルの配列を返します。
パラメータ
-
dictionary
-
PSpell\Dictionary クラスのインスタンス。
-
word
-
調べたい単語。
例
例1 pspell_suggest の例
<?php
$pspell = pspell_new("en");
if (!pspell_check($pspell, "testt")) {
$suggestions = pspell_suggest($pspell, "testt");
foreach ($suggestions as $suggestion) {
echo "Possible spelling: $suggestion<br />";
}
}
?>