Pspell pspell_suggest
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
pspell_suggest — 단어의 맞춤법 제안
설명
pspell_suggest(PSpell\Dictionary $dictionary
, string $word
): array|false
pspell_suggest()는 주어진 단어에 대해 가능한 철자의 배열을 반환합니다.
매개변수
dictionary
- PSpell\Dictionary 인스턴스입니다.
word
- 테스트한 단어입니다.
반환 값
가능한 철자의 배열을 반환합니다.
변경 로그
버전 | 설명 |
---|---|
8.1.0 | dictionary 매개변수는 이제 PSpell\Dictionary 인스턴스를 필요로 합니다. 이전에는 리소스가 필요했습니다. |
Examples
예제 #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 />";
}
}
?>