Adding new dictionaries to aspell: Difference between revisions

mNo edit summary
m (Reverted edit of Drwiii, changed back to last version by 193.127.7.62)
Line 55: Line 55:


* To add a set of custom words see this [http://aspell.sourceforge.net/man-html/Creating-an-Individual-Word-List.html How-To]
* To add a set of custom words see this [http://aspell.sourceforge.net/man-html/Creating-an-Individual-Word-List.html How-To]
[http://www.casino-games-wiki.com/index.php/casino_games_game casino games game]
[http://www.casino-theory.com/online-casino-royale/strategy-online-casino.html strategy online casino]
[http://www.gambling-online-theory.com/online-casino/online-casino-for-cash.html online casino for cash]
[http://www.gambling-online-theory.com/casinos/casinos-strategy.html casinos strategy]
[http://www.casino-theory.com/online-casino-bonus/index.html online casino bonus]
[http://www.casino-games-wiki.com/index.php/on_line_casino_games on line casino games]
[http://www.casino-games-wiki.com/index.php/online_casino_games online casino games]
[http://www.casino-games-wiki.com/index.php/online_casino_games online casino games]
[http://www.gambling-online-theory.com/online-casino/online-casino-for-cash.html online casino for cash]
[http://www.gambling-online-theory.com/fortune-roulette/on-line-roulette-game.html on line roulette game]

Revision as of 05:19, 18 November 2006

How to add a new dictionary to aspell

  • Download the dictionary from gnu.org
  • Extract it from the tar file in a work directory
  • Set Zimbra's aspell in the path with:
PATH=/opt/zimbra/aspell-0.60.3/bin:$PATH
  • Configure and install the dictionary according to the README

./configure
make
make install

  • Edit the file /opt/zimbra/httpd/htdocs/aspell.php to reference the new dictionary. For example to add the french dictionary:

$dictionary = pspell_new("en_EN");
TO
$dictionary = pspell_new("fr_FR");


NOTE: If you are using a non-english based language with special chars like tildes (spanish, for example), you have to modify aspell.php

This file is located at /opt/zimbra/httpd/htdocs/aspell.php. Replace this block (line 82 or so)

 $suggestions = implode(",", pspell_suggest($dictionary, $word));
 $misspelled .= "$word:$suggestions\n";

with this one:

 $suggestions = implode(",", pspell_suggest($dictionary, $word));
 $suggestions=iconv("iso-8859-1","UTF-8",$suggestions);
 $misspelled .= "$word:$suggestions\n";

There is also a problem when splitting words. Replace (line 48 or so)

$words = preg_split('/[^\w\'-]+/', $text);

with this one:

$words = preg_split('/[^\w\'-\xc0-\xfd-]+/', $text);

This regexp line should be enough for most western Europe languages (Spanish, French, German, Portuguese and Italian). It includes all ISO8859 europeean letters in the range 192-253 of the table below.

latin1.gif


  • To add a set of custom words see this How-To
Jump to: navigation, search