Re: unaccent

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: nngodinh(at)tiscali(dot)it
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unaccent
Date: 2002-09-18 12:08:59
Message-ID: Pine.GSO.4.44.0209181505000.20254-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 18 Sep 2002 nngodinh(at)tiscali(dot)it wrote:

> Greetings,
>
> As far as I use the txtidx data structure in conjunction with gist indexing
> to make a word indexing of a very large UNICODE db, I've implemented a PostgreSQL
> function that uses libunac to unaccent TEXT fileds.
>
> The resulting text is in UTF-8, but you can modify it in the sources with
> an appropriate value (using iconv charset names).
>
> Get libunac from: http://www.nongnu.org/unac/ (it uses iconv)
>
> Extract the archive, compile it (make). Move pg_unac.so to your postgresql
> shared libraries dir.
>
> Link it in postgresql:
>
> CREATE FUNCTION unac(TEXT) RETURNS TEXT AS 'path_to_pg_unac.so' LANGUAGE
> C;
>
> What about integrating unaccent libraries directly in tsearch? It is useful
> for french search engines (for instance).

I think better to have separate module contrib/unac and document using
it with tsearch. Please write us a couple of lines about using
your function and we'll add them into tsearch documentation.

btw, use palloc instead of malloc in postgresql functions .

>
> Bye.
>
> Nhan NGO DINH
>
>
> __________________________________________________________________
> Tiscali Ricaricasa
> la prima prepagata per navigare in Internet a meno di un'urbana e
> risparmiare su tutte le tue telefonate. Acquistala on line e non avrai
> nessun costo di attivazione nИ di ricarica!
> http://ricaricasaonline.tiscali.it/
>
>
>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

  • unaccent at 2002-09-18 10:14:49 from nngodinh

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-09-18 12:24:07 Re: RPMS for 7.3 beta.
Previous Message iafmgc 2002-09-18 11:28:57 genetic algorithm in PostgreSQL