gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] type of search pattern for demographics


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] type of search pattern for demographics
Date: Tue, 24 Aug 2004 17:07:34 +0200
User-agent: Mutt/1.3.22.1i

> Can >O("|'|`)+Hare< be modified to also capture OHare
Sure:

O("|'|`)*Hare  (note the asterisk instead of the +)

Added. In fact:

        # apostrophes et al
        normalized = normalized.replace('"', """("|'|`|-|\s)*""")
        normalized = normalized.replace('`', """("|'|`|-|\s)*""")
        normalized = normalized.replace("'", """("|'|`|-|\s)*""")
        normalized = normalized.replace('-', """(-|\s)*""")

There likely is a good regular expression introduction
somewhere on the web -- a Wiki link ...

> for example if the user thinks
> "hopefully I can just type ohare since that is the least work" ?
or o-hare or o hare or o"hare or o'hare or o`hare

> The value of any extra precision from being able to (or having to)
> input:
> o'hare if you THINK the patient could be O'hare
> (versus)
> ohare if you THINK not
> is doubtful yes?
Likely yes.

> I mean, you would never presume to distinguish
> two patients based on diacritical mark differences (accents) nor
> punctuation (apostrophe or hyphens) would you?
Not me. Much too error-prone, I suppose.

> PS I forgot the case of hyphenated names after marriage where
Dealt with, see above.

> I could not find the term "admonition" in relation to naming.
English I broken speak.

> "de" can relate to a physical attribute
Ah, like The Great.

> Must you "do" such mapping, or is it built into regex, and is regex built 
> into Postgres, or does it come from some other library?
Yes, regex matching is built into PG. No, mapping is not
"built into" regexes. Regular expressions are just a tool to
express the possible sequence of characters one will encounter
when looking at a particular string. Thus it needs to be
applied, eg. used. IOW we need to do the search term to regex
mapping ourselves and use that to match data stored in the
backend.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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