Skip Menu |

This queue is for tickets about the Lingua-EN-Syllable CPAN distribution.

Report information
The Basics
Id: 60988
Status: resolved
Priority: 0/
Queue: Lingua-EN-Syllable

People
Owner: NEILB [...] cpan.org
Requestors: peter [...] becauseofgames.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.251
Fixed in: 0.27



Subject: bug: -isms in comments but not in code
"-isms" is not matched in @AddSyl. It should be. Like -ism, it is one syllable. -isms explicitly noted in the comments but not coded for. Example: 'organisms' gives 3 syallables instead of 4. Fix: include 'isms$' in @AddSyl (keep 'ism$' also) i.e.replace: 'ism$', # -isms with 'ism$', # -ism 'isms$', # -isms I found this bug originally in haiku.py [haiku,v 1.17 2003/02/10], which is based largely on this module. I have only tested using python code, but the regex parts are identical.
tested this patch against a dictionary. patch was correct 19 out of 21. the current/original code gets 1 out of 21 correct. errors were: 'microorganisms' and 'yogiisms'. (the original code also gets 'microorganisms' wrong, and gets it more wrong) antagonisms - dictionary: [5] guess: 4 isms-patch: 5 schisms - dictionary: [2] guess: 1 isms-patch: 2 monisms - dictionary: [3] guess: 2 isms-patch: 3 puritanisms - dictionary: [5] guess: 4 isms-patch: 5 criticisms - dictionary: [4] guess: 3 isms-patch: 4 microorganisms - dictionary: [6] guess: 4 isms-patch: 5 surrealisms - dictionary: [4, 5] guess: 3 isms-patch: 4 isms - dictionary: [2] guess: 1 isms-patch: 2 organisms - dictionary: [4] guess: 3 isms-patch: 4 aphorisms - dictionary: [4] guess: 3 isms-patch: 4 prisms - dictionary: [2] guess: 1 isms-patch: 2 anachronisms - dictionary: [5] guess: 4 isms-patch: 5 dualisms - dictionary: [4] guess: 3 isms-patch: 4 euphemisms - dictionary: [4] guess: 3 isms-patch: 4 mechanisms - dictionary: [4] guess: 3 isms-patch: 4 mannerisms - dictionary: [4] guess: 3 isms-patch: 4 yogiisms - dictionary: [3, 3] guess: 3 isms-patch: 4 metabolisms - dictionary: [5] guess: 4 isms-patch: 5 baptisms - dictionary: [3] guess: 2 isms-patch: 3 embolisms - dictionary: [4] guess: 3 isms-patch: 4 methodisms - dictionary: [4] guess: 3 isms-patch: 4 Again, I'm only testing this against the python port of this module. (Though the regexes appear to be identical). Please test against some of the words above before commiting.
To correct myself: -ism (ɪz.əm) and -isms (ɪz.əms) are two syllables each. But that bug and fix aren't changed by that anyway...
Thanks. Addressed this in 0.27. Neil