DokuWiki

It's better when it's simple

사용자 도구

사이트 도구


ko:spell_checker

맞춤법 검사기

실험적인(experimental)

DokuWiki는 옵션으로 맞춤법 검사기를 제공합니다.

이 것은 Garrison Locke의 AJAX 맞춤법 검사기를 완전히 재작성했습니다.

차이점과 특징

  • 일관성있게 DokuWiki에 통합되었습니다.
  • pspell extension 대신 aspell을 사용합니다.
  • AJAX용 SACK 사용합니다.
  • 전송 한번으로 오류검사와 적절한 맞춤법 제안을 동시에 합니다.

맞춤법 검사기 실행하기

설정을 통해 맞춤법 검사기 기능이 가능하고 브라우저가 지원한다면 맞춤법 검사를 실행할 수 있는 툴바아이콘을 볼 수 있습니다.

맞춤법 검사를 실행하면 텍스트를 검사하고 모든 알려지지 않거나 잘못된 철자를 붉은 밑줄을 표시해 주는 정정 모드로 변경됩니다. 잘못된 철자를 고치기 위해 제안받은 항목에서 선택하거나 직접 단어를 수정할 수 있습니다. 오류 수정 작업이 끝난 후 검사 중지 버튼을 클릭하여 편집 모드로 돌아올 수 있습니다.

반드시 조심: 때때로 맞춤법 검사기는 텍스트가 크거나 오류가 많다면 오랜 시간이 걸릴 수 있습니다.

요구 사항

* 맞춤법 검사기를 사용하려면 [[wp>AJAX]] 호환 웹브라우저가 필요합니다. 알려진 웹브라우저는 다음과 같습니다.
  * 파이어폭스 1.0.4 이상
  * 인터넷 익스플로러 6
  * 오페라 8.0
  * 컹커러 3.3.2
  * 사파리
* GNU [[http://aspell.sf.net|aspell]] 0.60이상 이 위키서버에 설치되어 있어야 합니다.
* PHP 4.3.0이상  
* 위키에서 사용하려면 [[config:lang|language]]옵션에 설정된 언어에 맞는 aspell사전

개인 단어 목록

DokuWiki는 맞춤법 검사시 추가된 개인 단어를 사용할 수 있습니다. conf/words.aspell이름의 파일이 필요합니다. – 포맷을 참조하려면 Aspell 설명서를 보기 바랍니다.

설치

Windows

주의: 만일 PHP5와 IIS6을 사용한다면 동작하지 않습니다. - nice point를 사용해서 설치합니다.(최소한 하나 이상의 사전도 같이 설치) 만일 영어사전이 필요하다면 Aspell 0.60.3 for Win32No Status Quo에서 다운로드 합니다. 영어사전을 사용하지 않는 경우는 단지 0.5.x Aspell 바이너리만 가능합니다. 어찌되었든 잘 동작하는 것으로 보입니다. 1)

  1. 맞춤법 검사기를 동작시키려면 dokuwiki.php 환경 파일 수정하거나 local.php파일을 수정(없으면 생성)하여 aspell경로를 표시:
  $conf['spellchecker']= 1;
  define ('ASPELL_BIN','C:\apachefriends\xampp\Aspell\bin\aspell.exe');

aspell.exe경로에는 어떤 공백문자도 들어가면 안됩니다.(만일 Program Files에 설치한다면 Windows가 만드는 축약어 형태를 사용해야합니다. 'C:\PROGRA~1\Aspell\bin\aspell.exe' (No Status Quo를 사용해 설치한다면 축약어 형태로 설정) 축약어 형태의 이름을 보고 싶다면 dir /x를 명령어 프롬프트 상태에서 실행하면 됩니다.


When Using the Either of the ASPELL installs with version 2006-03-09 I just receive the error

"An error Occured while trying to run the spellchecker: 
Could not run ASPELL 'C:\PROGRA~1\Aspell\bin\aspell.exe'." 

I am using IIS 6 and PHP5. Any Ideas??

It works with IIS 5 and PHP4, so it might simply be incompatible with the newer versions. I'd suggest googling the heck out of it. — DGM2 2006-04-25 19:12

I got the same problem. Try add IUSR_ permissions to read and execute cmd.exe, located somewhere in System32, current windows directory. Warning: this can reduce your system security (yet: who cares ;-) ?) — Tomasz 2006-10-02 21:00

Debian

데비안 사용자라면:

#> apt-get install aspell

Gentoo

젠투 사용자라면:

#> emerge -a aspell

영어말고 다른 언어를 사용한다면 추가로 언어 패키지를 설치해야합니다. 예로 danish언어를 사용하려면:

#> emerge -a aspell-da

모든 사용가능한 언어 패키지를 확인하려면:

#> emerge -s aspell

OpenBSD 와 FreeBSD

dokuwiki는 몇가지 이유 때문에 자동으로 aspell 경로를 찾을 수 없으므로 직접 dokuwiki.php파일을 수정해야 합니다.

최근 DokuWiki버전은 conf/dokuwiki.php에 저장된 옵션 설정을 변경하는 대신 conf/local.php을 변경하도록 권장합니다.

define ('ASPELL_BIN','/usr/local/bin/aspell');

아파치가 chroot상(OpenBSD에서 기본)에서 동작한다면 aspell역시 chroot경로 상에 설치해야 합니다. :-

Comments/Discussion

It doesn't look like spellcheck.php is ever being called for me. I even changed the name of the file in the hopes of generating an error but none aee reported. I did check to see that this.run = function(){… was being called in spellcheck.js and it is. I also checked the value of this.handler in spellcheck.js and it looks good.

Dennis 2006-05-31 11:47

When I try to use the spellchecker, I get this error message:

An error occured while trying to run the spellchecker:
Aspell returned an error: sh: line 1: /aspell: No such file or directory

My aspell is located in /usr/bin and I added this line to my local.protected.php (I'm using Config plugin):

define ('ASPELL_BIN','/usr/bin/aspell');

I even tried to add it to dokuwiki.php, spellcheck.php and aspell.php before but it didn't help. Safe mode is turned off. What am I doing wrong?

Michał Tkacz 2005-11-22 14:10

Forget my above comment. Safe mode was turned on for that particular directory.

Michał Tkacz 2006-01-11 23:25

It's possible to use PHP's safe mode and DokuWiki's spell checker together by using the PHP option “safe_mode_exec_dir”.

Let's assume you have enabled PHP's safe mode in your Apache configuration like this:

   # make php more secure
   php_admin_value safe_mode 1

Let's assume further, you're using Fedora Core as your operating system. To get DokuWiki's spell checker work, follow these steps (of course, you have to be root):

0. Install aspell and additional dictionaries if necessary e. g.

  yum -y install aspell aspell-de [...]

1. Copy the aspell binary to your DokuWiki installation e. g.

  cp /usr/bin/aspell /var/www/sites/wiki.domain.example/bin/

2. Change the owner of the (new) aspell binary e. g.

  chown apache:apache /var/www/sites/wiki.domain.example/bin/aspell

3. Change your Apache configuration like this:

   # make php more secure
   php_admin_value safe_mode 1

   php_admin_value safe_mode_exec_dir "/var/www/sites/wiki.domain.example/bin"

4. Execute “/etc/init.d/httpd reload” and you're through.

Alexander Hoff / Chirado OHG 2006-03-11 18:40

To let your users edit the personal wordlist, you may do the following. Modify lib/exe/spellcheck.php by adding following line at the top of the file:

require_once(DOKU_INC.'inc/pageutils.php');

and replacing following lines:

//add personal dictionary
if(@file_exists(DOKU_INC.'conf/words.aspell')){
  $spell->personal = DOKU_INC.'conf/words.aspell';
}

with:

//add personal dictionary
if(@file_exists(wikiFN($conf['personal']))) {
  $spell->personal = wikiFN($conf['personal']);
}

Then add following line to your conf/local.php:

$conf['personal'] = 'ignore-list';

where ignore-list is the name of the page containing personal wordlist (it may include namespace). Be aware that the format of the personal wordlist is quite restrictive.

Michał Tkacz 2006-01-14 13:07

I can't seem to get the spell checker to work. I have aspell 60.3 installed, added the two lines to local.php as recommended, and even granted the IUSR_.. account read/execute permissions to the aspell directory. When you click on the spell check button, the text area window dims briefly, and the tool tip for the button indicates “No mistakes found”. Anyone else get this to work on Windows Server 2003 w/IIS 6? I get the same results using both IE and Firefox. — GaryV 2006-06-25 11:30

This sounds like the same issue I mentioned above. I've spend many hours trying to figure this out. — Dennis 2006-06-26 23:47

Try add IUSR_ permissions to read and execute cmd.exe, located somewhere in System32, current windows directory. Warning: this can reduce your system security (yet: who cares ;-) ?) — Tomasz 2006-10-02 11:00

Possible errors

Aspell version

My system has a newly installed Aspell 0.60.4, and spell-check hasn't worked. I always got an error message, but without Aspell's error. I've modified the inc/aspell.php:

            // close process
            $exitcode=proc_close($process);               //Always got '-1' :-o
            if ($err){                                    //Modified rule
                //something went wrong
                $err = "Aspell returned an error(".ASPELL_BIN." exitcode: " . $exitcode . "):\n" . $err;
                return false;
            }

It's working fine in my system now with this modification.


Péter Szládovics 2005-11-23 15:38

Just to confirm this also fixed things for me, using aspell-0.60.4 on Linux (Fedora Core 4). Thx. — Robert Meerman 2006-03-09 03:48

번역

english version: dokuwiki-2006-11-06.

Add your email here if you created translated or modified whole or part of this page.

  • jk Lee - real mail domain is gmail, not zoo.com for spam filtering 2007-2-5 created
1)
In my setup it does not work, if the size of page to check is too large — Konrad Bauckmeier 2005-10-17 15:38
ko/spell_checker.txt · 마지막으로 수정됨: 2008-08-10 20:06 저자 clorr

별도로 명시하지 않을 경우, 이 위키의 내용은 다음 라이선스에 따라 사용할 수 있습니다: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki