
aspell\pspell을 설치했는데 설치하면
> aspell dump dicts
ar
cs
de
de_AT
de_CH
de_DE
en
en-variant_0
en-variant_1
en-variant_2
en-w_accents
en-wo_accents
en_CA
en_CA-variant_0
en_CA-variant_1
en_CA-w_accents
en_CA-wo_accents
en_GB
en_GB-ise
en_GB-ise-w_accents
en_GB-ise-wo_accents
en_GB-ize
en_GB-ize-w_accents
en_GB-ize-wo_accents
en_GB-variant_0
en_GB-variant_1
en_GB-w_accents
en_GB-wo_accents
en_US
en_US-variant_0
en_US-variant_1
en_US-w_accents
en_US-wo_accents
es
fr-40
fr-60
fr
fr-80
fr-lrg
fr-med
fr-sml
fr_CH-40
fr_CH-60
fr_CH
fr_CH-80
fr_CH-lrg
fr_CH-med
fr_CH-sml
fr_FR-40
fr_FR
fr_FR-60
fr_FR-80
fr_FR-lrg
fr_FR-med
fr_FR-sml
pt_BR
pt_PT
ro
ro-classic
ru
ru-ye
ru-yeyo
ru-yo
sv
tr
하지만 이 간단한 스크립트를 실행하면 다음과 같습니다.
<?php
$dict = pspell_new ("en");
if (!pspell_check ($dict, "carr")) {
$suggestions = pspell_suggest ($dict, "carr");
foreach ($suggestions as $suggestion) {
echo "Did you mean: $suggestion?<br />";
}
}
?>
다음 오류가 발생합니다.
PHP 경고: pspell_new(): PSPELL이 사전을 열 수 없습니다. 이유: "en" 언어에 대한 단어 목록을 찾을 수 없습니다. 2번째 줄의 /usr/share/nginx/html/t.php에서
aspell이 올바르게 설치되었다고 확신합니다. phpinfo()에서도 pspell이 활성화되어 있다고 나옵니다. PHP가 잘못된 디렉토리에서 사전을 검색하고 있는 것 같습니다. 어느 디렉토리에 있는지 알 수 있는 방법이 있나요?
답변1
PHP/Aspell 코드를 실행 중입니다. 나는 PHP/Aspell에 대한 경험이 없습니다. 그러나 나는 Perl과 Ruby로 일부 Aspell 코드를 조립했고 이에 대한 경험도 있습니다. PHP/Aspell 문제는 얼핏 보면 Aspell 구성 문제인 것처럼 보입니다. 다음 URL 링크(Perl/Aspell 링크)를 제공했습니다.http://vouters.dyndns.org/tima/Linux-Windows-Perl-Aspell-Determining_the_country_of_a_Web_query.html도움이 되었다면 기쁘겠습니다. 만약 당신이 매우 호기심이 많고 열린 마음을 갖고 있다면 Perl 코드와 동등한 Ruby/Aspell을 참조할 수 있습니다.http://vouters.dyndns.org/tima/Linux-Ruby-Aspell-Determining_the_country_of_a_Web_query.html. 이 Ruby/Aspell 작업은 Aspell 솔루션을 기반으로 하는 동일한 알고리즘에서 Ruby와 Perl 성능을 비교하려는 유일한 의도를 가지고 있습니다.
정말 당신이에요, 필립