From: Daniel Fetchinson on 15 Jul 2010 12:24 > I'm pleased to announce the release of inflect.py v0.1.8, a module that > correctly generates: > > * the plural of singular nouns and verbs > * the singular of plural nouns > * ordinals > * indefinite articles > * present participles > * and converts numbers to words Wow! Tons of kudos, this must have been hell of a work to put together with all the irregular nouns/verbs/etc, and I really needed something like this for a long time. Thanks a lot, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
From: Thomas Jollans on 15 Jul 2010 12:41 On 07/15/2010 01:00 PM, Paul wrote: > > > I'm pleased to announce the release of inflect.py v0.1.8, a module that > correctly generates: > > * the plural of singular nouns and verbs > * the singular of plural nouns > * ordinals > * indefinite articles > * present participles > * and converts numbers to words Which languages does it support? If the answer is what I expect it is, did you design the module with multilingualism in mind?
From: Stefan Behnel on 15 Jul 2010 12:58 Thomas Jollans, 15.07.2010 18:41: > On 07/15/2010 01:00 PM, Paul wrote: >> I'm pleased to announce the release of inflect.py v0.1.8, a module that >> correctly generates: >> >> * the plural of singular nouns and verbs >> * the singular of plural nouns >> * ordinals >> * indefinite articles >> * present participles >> * and converts numbers to words > > Which languages does it support? If the answer is what I expect it is, It is. Most of the time, when people forget to say what they are talking about, assuming that they are either US-Americans or Windows users will hit the nail on the head. Still, a pretty nice tool, I'd say. > did you design the module with multilingualism in mind? Just look at the code, it consists almost exclusively of long lists of words. Multilingualism clearly wasn't a design goal. Stefan
From: Paul on 16 Jul 2010 11:15 > Thomas Jollans, 15.07.2010 18:41: > > On 07/15/2010 01:00 PM, Paul wrote: > >> I'm pleased to announce the release of inflect.py v0.1.8, a module that > >> correctly generates: > >> * the plural of singular nouns and verbs > >> * the singular of plural nouns > >> * ordinals > >> * indefinite articles > >> * present participles > >> * and converts numbers to words > > Which languages does it support? If the answer is what I expect it is, > It is. Most of the time, when people forget to say what they are talking > about, assuming that they are either US-Americans or Windows users will hit > the nail on the head. > Still, a pretty nice tool, I'd say. > > did you design the module with multilingualism in mind? > Just look at the code, it consists almost exclusively of long lists of > words. Multilingualism clearly wasn't a design goal. > Stefan The module is based upon a Perl module that has been around for about ten years. I did a line by line translation of the Perl code into Python, got that working and am now slowly redesigning the code. I am currently removing many of the regular expressions, which makes the code many times faster (and clearer, I think). The code alternates between applying rules and using lists of words. The author of the original Perl code, Damian Conway, wrote an academic paper on the approach taken. http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html A future goal is to have this work in a way that is far more pluggable and so be applicable to other languages. But at the moment I'm happy to have got it working. I'm pretty sure that if Damian was writing this from scratch today he would design it differently. However, I had existing Perl code that worked, so I would rather start with that, get it working in Python and covered by tests. Then I can improve the design with the safety of test coverage. The Perl version is called Lingua::EN::Inflect, so was more explicit about being for English in its naming and there are other Perl Lingua::XX::Inflects for other languages. But my lack of mentioning English in the announcement was an oversight. Both the Perl author and I are Australian, and so the modules support British English over American English where necessary, with the Oxford English Dictionary as our guide. Cheers, Paul
From: Daniel Fetchinson on 16 Jul 2010 11:26 >>> I'm pleased to announce the release of inflect.py v0.1.8, a module that >>> correctly generates: >>> >>> * the plural of singular nouns and verbs >>> * the singular of plural nouns >>> * ordinals >>> * indefinite articles >>> * present participles >>> * and converts numbers to words >> >> Which languages does it support? If the answer is what I expect it is, > > It is. Most of the time, when people forget to say what they are talking > about, assuming that they are either US-Americans or Windows users will hit > the nail on the head. And most of the time, when people are bitching about US-Americans, assuming that they are Europeans will hit the nail on the head :) Duck-and-run-ly yours, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
|
Next
|
Last
Pages: 1 2 Prev: empty set and empty dict for Python 3 Next: Q for Emacs users: code-folding (hideshow) |