5

I am quite new to postgresql full text search and I am setting up the configuration as where can I download the ispell *.dict and *.affix filefollowing (exactly as in docs):

CREATE TEXT SEARCH DICTIONARY english_ispell (
    TEMPLATE = ispell,
    DictFile = english, 
    AffFile = english, 
    StopWords = english
);

So, this I think expects files english.dict and english.affix on for example:

/usr/share/postgresql/9.2/tsearch_data

But these files are not there. I just have ispell_sample.dict and ispell_sample.affix - which when included above work fine - no problem.

So... I followed this post and downloaded the required dictionary from the open office people and renamed the .dic to .dict and .aff to .affix. Then I have checked (using file -bi dict.affix and file -bi english.dict and they are UTF8 encoded).

When I run the above text search dictionary, I get the error:

 ERROR:  wrong affix file format for flag
 CONTEXT:  line 2778 of configuration file "/usr/share/postgresql/9.2/tsearch_data/english.affix": "COMPOUNDMIN 1
 "

I was wondering if anyone had clues on how to solve this problem or if anyone had encountered this before.. Thanks./.

UPDATE:1: I guess the question can be rephrased as follows: where can I download the ispell *.dict and *.affix file for postgres

4

1 回答 1

3

这是一个很好的参考:https ://www.cs.hmc.edu/~geoff/ispell-dictionaries.html对于任何语言的词典来说,这是一个很好的资源。

于 2013-11-13T02:43:18.113 回答