Problem loading ispell affix file with apostrophes

Поиск
Список
Период
Сортировка
От Jean-Baptiste Quenot
Тема Problem loading ispell affix file with apostrophes
Дата
Msg-id ae63f8b50807210309r74234each24e236b9ceb0c506@mail.gmail.com
обсуждение исходный текст
Ответы Re: Problem loading ispell affix file with apostrophes
Список pgsql-bugs
I'm having problem with french dictionaries.  Loading an ispell affix
file with apostrophes does not work.  The file comes from the ifrench
(french dict for ispell) debian source package at
http://packages.debian.org/sid/ifrench

Here's the session excerpt:

------------------------------------------------------------------------
Welcome to psql 8.3.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

dockee=3D# select plainto_tsquery('custom_french', 'bug');
ERROR:  syntax error at line 158 of affix file
"/usr/share/postgresql/8.3/tsearch_data/ispell_french.affix"

dockee=3D# show lc_ctype ;
  lc_ctype
-------------
 en_US.UTF-8
(1 row)

dockee=3D# show client_encoding;
 client_encoding
-----------------
 UTF8
(1 row)

dockee=3D# show server_version;
 server_version
----------------
 8.3.3
(1 row)
------------------------------------------------------------------------


The 'custom_french' text configuration is defined as below:

------------------------------------------------------------------------
CREATE TEXT SEARCH CONFIGURATION public.custom_french ( COPY =3D
pg_catalog.french );

CREATE TEXT SEARCH DICTIONARY french_ispell (
    TEMPLATE =3D ispell,
    DictFile =3D ispell_french,
    AffFile =3D ispell_french
);

ALTER TEXT SEARCH CONFIGURATION custom_french
    ALTER MAPPING FOR
        asciiword,
        asciihword,
        hword_asciipart,
        word,
        hword,
        hword_part
    WITH french_ispell ;

ALTER TEXT SEARCH CONFIGURATION custom_french
    DROP MAPPING FOR
        url,url_path,sfloat,float,file,int,version;
------------------------------------------------------------------------


Line 158 of file ispell_french.affix corresponds to the first flag
definition that triggers a prefix with an apostrophe, it's the line
below "flag *N"

------------------------------------------------------------------------
flag *D:                        # d=E9: d=E9faire, d=E9grossir
    .               >   d=E9

flag *N:                        # =E9lision d'une n=E9gation
    [a=E0=E2e=E8=E9=EAi=EEo=F4uh] >   n'      # je n'aime pas, il n'y a pas
------------------------------------------------------------------------

Maybe apostrophes in ispell affix files are simply not supported?  I
can't find a mention of this limitation in the documentation at
http://www.postgresql.org/docs/8.3/static/textsearch-dictionaries.html

When commenting out the offending flag definitions, the affix file
loads successfully.  Thanks in advance for helping me resolve this
problem.
--=20
Jean-Baptiste Quenot
http://jbq.caraldi.com/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: winsock error 10004
Следующее
От: Rainer Bauer
Дата:
Сообщение: Re: winsock error 10004