search on accents over all possible matches

search on accents over all possible matches

Post by Jaume Tei » Thu, 29 Mar 2001 01:46:06



Hello,

I'm developing a search tool with php against a posgresql database.
As the database is in catalan an in spanish is obvious that a simple
search like:
(SELECT * FROM painters WHERE artist_name ~* 'Dali');

should perform over Dd Aa Ll Ii (and will not found Dal).
but on an accent based language also should perform over ??

question is:

this c function from Patrice Hd is the most appropiate tool for
searching on an accent based language ?
http://www.postgresql.org/mhonarc/pgsql-sql/1998-06/msg00119.html

or should I use an implemented function inside postgres right now ?

bests from barcelona,
jaume teixi.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly

 
 
 

search on accents over all possible matches

Post by David Liza » Thu, 29 Mar 2001 02:13:55



Quote:>Hello,

>I'm developing a search tool with php against a posgresql database.
>As the database is in catalan an in spanish is obvious that a simple
>search like:
>(SELECT * FROM painters WHERE artist_name ~* 'Dali');

>should perform over Dd Aa Ll Ii (and will not found Dal).
>but on an accent based language also should perform over ??

>question is:

>this c function from Patrice Hd is the most appropiate tool for
>searching on an accent based language ?
>http://www.postgresql.org/mhonarc/pgsql-sql/1998-06/msg00119.html

>or should I use an implemented function inside postgres right now ?

>bests from barcelona,
>jaume teixi.

Using regular expressions from PHP you can convert "a" into "[Aa?]" and
from the original SQL query:
         (SELECT * FROM painters WHERE artist_name ~* 'Dali');

You obtain
         (SELECT * FROM painters WHERE artist_name ~* 'D[Aa?]l[Ii?]');

generating a new complete regular expression for the SQL language.

It should be valid for Dali, Dli, Dal, Dl, and others.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David Lizano - Director rea tcnica

I Z A N E T - Servicios integrales de internet.
web: http://www.izanet.com/
Direccin: C/ Checa, 57-59, 3o D - 50.007 Zaragoza (Espa?a)
Telfono: +34 976 25 80 23    Fax: +34 976 25 80 24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

 
 
 

search on accents over all possible matches

Post by Peter Eisentra » Thu, 29 Mar 2001 02:24:23


Quote:Jaume Teixi writes:
> this c function from Patrice Hd is the most appropiate tool for
> searching on an accent based language ?
> http://www.postgresql.org/mhonarc/pgsql-sql/1998-06/msg00119.html

Looks good to me.

Quote:> or should I use an implemented function inside postgres right now ?

The reason there is no such implementation, and probably won't be any time
soon, is that this tool would either have to hard-code or ignore natural
language semantics, neither of which would make it practical.  Not all
languages have the same accent ignoring or accent folding rules or
conventions.

--

---------------------------(end of broadcast)---------------------------

 
 
 

1. ignoring accents while searching

Hi,
I'm a webprogrammer using PHP and have a new a
project which involves informix internet
foundation 2000 and Excalibur Text Search
DataBlade Module 1.2.  The data held in one of
the fields is CLOB.

Now my quesiton is.. i need to searches where it
ignores the accents in words.  ie, when i do a
search for 'stage', i want the results to
involve 'stag'... how can this be possible?
also since the project involves english, greek,
and turkish.

is the only possible way to write a php script to
add accents to particular letters and search a
ton of words?

email me please..

Bedig

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Information Exploration Shootout

3. Accent in MS Search

4. Advice needed on moving datafiles

5. help searching text with accents and umlauts

6. Request regarding logs

7. unconditional accent search

8. Help !!!!!!SQL Server Error 2: ODBC SQL Server Driver(DBNMPNTW) Access Denied

9. accent insensitive search?

10. Full Text Search and Accent Insensitive in SQL 7.0

11. MySQL accented letters and case insensitive searching...

12. Accent insensitive full-text search

13. SQL 7 Full Text search service doesn't work correctly with accent insensitive