gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Re: Searching (Was: ha)


From: Andreas Tille
Subject: [Gnumed-devel] Re: Searching (Was: ha)
Date: Tue, 1 Apr 2003 11:32:24 +0200 (CEST)

On Tue, 1 Apr 2003, Karsten Hilbert wrote:

> In fact, I didn't think of this. How do you like this code:
>
>  no_umlauts =        raw.replace('Ä', '(Ä|AE|Ae|E)')
>  no_umlauts = no_umlauts.replace('Ö', '(Ö|OE|Oe)')
>  no_umlauts = no_umlauts.replace('Ü', '(Ü|UE|Ue)')
>  no_umlauts = no_umlauts.replace('ä', '(ä|ae|e)')
>  no_umlauts = no_umlauts.replace('ö', '(ö|oe)')
>  no_umlauts = no_umlauts.replace('ü', '(ü|ue|y)')
>  no_umlauts = no_umlauts.replace('ß', '(ß|sz|ss)')
>  # René, Desiré, ...
>  no_umlauts = no_umlauts.replace('é', '(é|e)')
>  # other replacements possible but rarely useful in German:
>  #if re.match("^(\s|\t)*[a-zäöüßéáúóçøA-ZÄÖÜÇØ]+(\s|\t)*$", raw):
I think something like that will be necessary but I'm quite sure that
you have to do some linguistic research to get a complete set of
replacements.  It is a good start which should be done anyway.

Kind regards

        Andreas.

--
Mankind must put an end to war before war puts an end to mankind.
John F. Kennedy





reply via email to

[Prev in Thread] Current Thread [Next in Thread]