I want to post something, so I'll post this little piece of code I made in php. I created a little "Pluralizer" (try the pluralizer here). It's very simple; it takes a singular noun, then returns it's plural. It's based on the algorithm by Damian Conway. See his paper, An Algorithmic Approach to English Pluralization. You can download the source here. The tarball contains:
Just check out the test_plural.php if you want to see how to use it. I haven't implemented the pro-noun pluralization rules yet, but they should be very simple to create. It also has all the operations Damian specified, so implementing the others should be an almost cut-and-paste job (though you'll have to create the special rules in plural.txt as well).I created this as part of another project I am working on, so hopefully I'll get that up here soon as well :)
Comments
Checking it out!
Just found this blog while looking for a pluralizer for a project I am working on. Hope it works out... Thanks!
Glad to hear, hope it works
Glad to hear, hope it works out for you!