On Sat, Oct 29, 2011 at 18:47, IƱaki Baz Castillo <ibc / aliax.net> wrote: > 2011/10/29 Dave Aronson <rubytalk2dave / davearonson.com>: >> Ask yourself how you do it as a human. You look at the first letter >> to see if it's a vowel, right? (Omitting for now some special cases >> like h and y under certain circumstances.) ... > Not exactly: "a user" :) Good point, but I was trying to Keep It Simple. If the OP seemed more well-versed in Ruby, or at least in programming, I'd suggest an approach like ActiveSupport::Inflector, whereby it *starts* with some simple rules like that, but also has a built-in knowledgebase of exceptions, and lets you extend that KB with more exceptions. So I guess the question for Faith is, how accurate does it need to be? I get the impression this is an early homework assignment, for a beginner's class in programming, using Ruby. (As opposed to a class for already seasoned programmers, to learn Ruby.) In that case, I still think my original suggestion is rather appropriate. If the class is more advanced, or this is to be real-world production code, that's different.... -Dave -- LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern languages. Where: Northern Virginia, Washington DC (near Orange Line), and remote work. See: davearonson.com (main) * codosaur.us (code) * dare2xl.com (excellence). Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (Aronson)