差分
このページの2つのバージョン間の差分を表示します。
dokuwiki:ja:spell_checker [2006/11/11] – 作成 administrator | dokuwiki:ja:spell_checker [2022/03/12] (現在) – 外部編集 127.0.0.1 | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== スペルチェック ====== | ||
+ | |||
+ | [[experimental]] | ||
+ | |||
+ | DokuWiki has an optional SpellChecker. This is a nearly complete rewrite of the Garrison Locke' | ||
+ | |||
+ | Here are the differences and features | ||
+ | |||
+ | * seamless integrated into DokuWiki | ||
+ | * no need for the pspell extension but uses aspell instead | ||
+ | * uses [[http:// | ||
+ | * gets mistakes and suggestions in one transfer | ||
+ | |||
+ | |||
+ | ===== Invoking The SpellChecker ===== | ||
+ | |||
+ | When the spellchecker is enabled in the [[config# | ||
+ | |||
+ | Please note: Spellchecking can take some time, especially when your text is large or contains many mistakes. | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | |||
+ | * To use the spellchecker you need an [[wp> | ||
+ | * Firefox 1.0.4 or higher | ||
+ | * Internet Explorer 6 | ||
+ | * Opera 8.0 | ||
+ | * Konqueror 3.3.2 | ||
+ | * Safari | ||
+ | * GNU [[http:// | ||
+ | * PHP 4.3.0+ | ||
+ | * An aspell dictionary for the [[wiki: | ||
+ | |||
+ | ===== Personal Wordlist ===== | ||
+ | |||
+ | DokuWiki can use an additional personal wordlist when spell checking. The file needs to be named '' | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | ==== Windows ==== | ||
+ | |||
+ | Note: if you are using PHP5 and IIS6, this cannot be made to work; anything returned from aspell is, for some reason, ignored. | ||
+ | |||
+ | - Use the nice point and click installers to install Aspell and at least one dictionary. If you're using an English dictionary you can download [[http:// | ||
+ | - Edit your dokuwiki.php config file (or better, edit/create local.php) to activate the spell checker *and* to give the path to Aspell, e.g, from my local.php: | ||
+ | |||
+ | $conf[' | ||
+ | define (' | ||
+ | |||
+ | You'll notice that the path to aspell.exe does not contain any spaces. If you have installed Aspell to ' | ||
+ | |||
+ | You can list the abbreviated directory names by entering '' | ||
+ | |||
+ | ---- | ||
+ | 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 ' | ||
+ | </ | ||
+ | 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. --- // | ||
+ | |||
+ | I got the same problem. Try add **'' | ||
+ | --- // Tomasz 2006-10-02 21:00// | ||
+ | |||
+ | ==== Debian ==== | ||
+ | |||
+ | If you are running Debian: | ||
+ | |||
+ | #> apt-get install aspell | ||
+ | |||
+ | ==== Gentoo ==== | ||
+ | |||
+ | If you are running Gentoo: | ||
+ | |||
+ | #> emerge -a aspell | ||
+ | |||
+ | You also need to install a language package, if you don't wish to use English. Ex for danish: | ||
+ | |||
+ | #> emerge -a aspell-da | ||
+ | |||
+ | For a complete list of available language packages use: | ||
+ | |||
+ | #> emerge -s aspell | ||
+ | |||
+ | ==== OpenBSD and FreeBSD ==== | ||
+ | |||
+ | For some reason // | ||
+ | |||
+ | Note that for recent versions of DokuWiki '' | ||
+ | configuration defaults stored in '' | ||
+ | |||
+ | define (' | ||
+ | |||
+ | Also, make sure that if you run Apache chrooted (default on OpenBSD) you installed aspell in chroot path :-) | ||
+ | |||
+ | ===== Comments/ | ||
+ | |||
+ | It doesn' | ||
+ | |||
+ | --- // Dennis 2006-05-31 11:47// | ||
+ | |||
+ | When I try to use the spellchecker, | ||
+ | |||
+ | An error occured while trying to run the spellchecker: | ||
+ | Aspell returned an error: sh: line 1: /aspell: No such file or directory | ||
+ | |||
+ | My '' | ||
+ | |||
+ | define (' | ||
+ | |||
+ | I even tried to add it to '' | ||
+ | |||
+ | --- // | ||
+ | |||
+ | Forget my above comment. Safe mode was turned **on** for that particular directory. | ||
+ | |||
+ | --- // | ||
+ | |||
+ | It's possible to use PHP's safe mode and DokuWiki' | ||
+ | |||
+ | Let's assume you have enabled PHP's safe mode in your [[http:// | ||
+ | |||
+ | < | ||
+ | # make php more secure | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Let's assume further, you're using [[wp> | ||
+ | |||
+ | 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 / | ||
+ | </ | ||
+ | |||
+ | 2. Change the owner of the (new) aspell binary e. g. | ||
+ | |||
+ | < | ||
+ | chown apache: | ||
+ | </ | ||
+ | |||
+ | 3. Change your Apache configuration like this: | ||
+ | |||
+ | < | ||
+ | # make php more secure | ||
+ | | ||
+ | |||
+ | | ||
+ | </ | ||
+ | |||
+ | 4. Execute "/ | ||
+ | |||
+ | --- // | ||
+ | |||
+ | To let your users edit the personal wordlist, you may do the following. Modify '' | ||
+ | < | ||
+ | and replacing following lines: | ||
+ | < | ||
+ | //add personal dictionary | ||
+ | if(@file_exists(DOKU_INC.' | ||
+ | $spell-> | ||
+ | } | ||
+ | </ | ||
+ | with: | ||
+ | < | ||
+ | //add personal dictionary | ||
+ | if(@file_exists(wikiFN($conf[' | ||
+ | $spell-> | ||
+ | } | ||
+ | </ | ||
+ | Then add following line to your '' | ||
+ | < | ||
+ | where '' | ||
+ | Be aware that the [[http:// | ||
+ | |||
+ | --- // | ||
+ | |||
+ | 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, | ||
+ | |||
+ | 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 **'' | ||
+ | --- // 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' | ||
+ | <code php> | ||
+ | // close process | ||
+ | $exitcode=proc_close($process); | ||
+ | if ($err){ | ||
+ | //something went wrong | ||
+ | $err = " | ||
+ | return false; | ||
+ | } | ||
+ | </ | ||
+ | It's working fine in my system now with this modification.\\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | --- // | ||
+ | |||
+ | > Just to confirm this also fixed things for me, using aspell-0.60.4 on Linux (Fedora Core 4). Thx. --- // | ||