Phyththon misspelling contest
Egbert Bouwman
egbert at bork.demon.nl
Fri Feb 25 10:18:59 EST 2000
Usually I get good results with the following expression:
r'\bph?(ph)*[iye]+th?o?n+e?\b',re.IGNORECASE
It is based on the following principles:
(1) spelling should follow pronunciation:
- the h is never pronounced, and thus not necessary
- the o is nearly mute, and can be omitted as well
(2) it should accept common misconceptions about spelling
(3) it should be politically correct:
- an a in the first syllable is a dutch invention,
and as such not aceptable. Nearly all of the former
dutch in Holland (Michigan) voted for Bush.
However, perhaps they were only very shrewd by choosing
the weaker opponent for Al Gore. But shrewdness is not
correct either. Think of Odysseus.
(4) spelling may give indications how _not_ to pronounce a word:
- people in french speaking parts of the world (Quebec,
Martinique) should write something like pitonne just to
indicate that the pronounced word does not end in a nasal
sound, " le ton ou piton nasal".
The applicability of this expression is nearly universal
because it accepts pitn as well as phphphieyythonne.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
========================================================================
More information about the Python-list
mailing list