[Top][All Lists]

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

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

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Searching (Was: ha)
Date: Tue, 1 Apr 2003 10:46:05 +0200
User-agent: Mutt/

> > - same search term ("becker")
> Here I would probably search for *cker or at least B.cker or whatever, but
No you wouldn't because you'd have the chipcard to do the
search with :*)))

But either ".*cker", "^B(ä|ae|e)cker$" or other clever
regexes are entirely possible. Just type them in. However,
"bäcker" will *automatically* get converted to
"^B(ä|ae)cker" (which also matches "Bäckersmann" btw) for the
first stab at getting results.

> input of just "cker" to search for this name would be more handy in my 
> opinion.
You certainly can but it'll take an order of magnitude
longer (on machines where this is noticeable at all).

> (For the non German speackers: There are Becker and Bäcker which
> have the same sound.)
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):

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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