Dutch myspell/hunspell .aff file giving errors when loaded in PostgreSQL
On the Debian bug reporting page it said that I should ask here if I wasn't
sure where to report a bug.
The problem is that the file /usr/share/hunspell/nl.aff (part of the
myspell-nl package) gives errors if you construct a ispell Dictionary with
it in PostgreSQL as follow:
CREATE TEXT SEARCH DICTIONARY dutch_ispell (
template = ispell,
DictFile = nl,
AffFile = nl,
StopWords = dutch
);
The error reads:
ERROR: wrong affix file format for flag
CONTEXT: line 827 of configuration file
"/usr/share/postgresql/9.3/tsearch_data/nl.affix": "SFX CA Y 2"
In the nl.affix file it says:
# accept an optional - when compounding, first part
# the second line allows for the optional hyphen
SFX CA Y 2
SFX CA 0 /CaCp
SFX CA 0 -/CaCp
In the PostgreSQL documentation it reads
(http://www.postgresql.org/docs/8.3/static/textsearch-dictionaries.html#TEXT
SEARCH-ISPELL-DICTIONARY):
Note: MySpell does not support compound words. Hunspell has sophisticated
support for compound words. At present, PostgreSQL implements only the basic
compound word operations of Hunspell.
So the problems are:
- The package Myspell-nl appears to deliver a Hunspell dictionary (there is
not even a simlink in the /usr/share/myspell/dits/ directory, there are
simlinks there for the Hunspell files installed through the Hunspell-en and
Hunspell-de packages)
- PostgreSQL does not support COMPOUND words in Hunspell files (or atleast
not the way it is done in the Dutch affix file)
- Since I only know this error to appear in PostgreSQL when using the Dutch
myspell files I don't know where to report this, the myspell-nl package or
the PostgreSQL-common package (the PostgreSQL-common package comes with the
"pg_updatedicts" this copies supported installed files to
/var/cache/postgresql/dicts/ and creates links to them in
/usr/share/postgresql/9.3/tsearch_data
Hope someone can point me in the right direction,
Greetings W
Reply to: