PageRenderTime 33ms CodeModel.GetById 17ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/shabti/templates/moinmoin/data/moin/underlay/pages/HelpOnSpellCheck/revisions/00000001

https://bitbucket.org/gawel/shabti
#! | 43 lines | 35 code | 8 blank | 0 comment | 0 complexity | 738aa15e101e87c85c61dcf97d01a649 MD5 | raw file
 1## Please edit system and help pages ONLY in the master wiki!
 2## For more information, please see MoinMoin:MoinDev/Translation.
 3##master-page:Unknown-Page
 4##master-date:Unknown-Date
 5#acl -All:write Default
 6#format wiki
 7#language en
 8HelpContents > HelpOnAdministration > HelpOnSpellCheck
 9
10== The Spell Checking Option ==
11MoinMoin looks for valid words in three places:
12
13 * the "dict" directory in the MoinMoin package directory (if "dict" doesn't exist, you may need to create it)
14{{{
15/usr/lib/python2.4/site-packages/MoinMoin/dict (typical Linux location)
16C:\Python24\Lib\site-packages\MoinMoin\dict (typical Windows location)}}}
17 * the "dict" directory of data directory of your wiki (per-wiki dictionnary)
18 * the page LocalSpellingWords
19If the "dbhash" module is available with your Python installation, the files in "dict" are read only ''once'' and stored in a hash table. This speeds up the spell checking process because the number of words in the ''checked page'' determines the time needed for the checking, ''not'' the number of words in the dictionary (with 250000 words, some hundred milliseconds instead of several seconds).
20
21Note that it may take a few minutes to build up this database, but only the first time the spellchecker is called. If your browser or the webserver timeouts before the file is completely built, one solution is to telnet into your webserver, and manually request the page<<FootNote(The next version will provide a tool to create the database on the command line.)>>.
22
23BTW, a UNIX machine normally comes with at least one words file; to use those, create a symlink within the dict directory, like so:
24
25{{{
26MoinMoin/dict> ln -s /usr/dict/words .
27}}}
28On some systems, the words file is found in "/usr/share/dict/words" instead.
29
30=== Example ===
31{{{
32MoinMoin> ls -l dict
33-rw-r--r--   1 544      everyone   409067 Jan 04 06:38 american-english
34-rw-r--r--   1 544      everyone  2913577 Jan 25  2000 german.txt
35-rw-r--r--   1 544      everyone    92631 Nov 30 15:24 top10000de.txt
36}}}
37=== Words files ===
38If you need words files for US English or German, see {{{contrib/dict/}}} directory in your moin archive.
39
40=== If it does not work ===
41If you change the contents of {{{MoinMoin/dict/}}} or {{{data/dict/}}} (because of adding new / removing old dictionaries) or if you create a new {{{MoinMoin/dict/}}} or {{{data/dict/}}} directory, then you have to delete the file {{{<yourwiki>/data/cache/spellchecker.dict}}} (a new one will be created automagically).
42
43If you don't, your new dictionaries won't be recognized (e.g. it will use only LocalSpellingWords). Another possible cause of problems is that you did not place the dictionaries in the ''active'' "MoinMoin" package directory, i.e. the one that is actually imported by your CGI script.