Is there a method that works similar to singularize to prepend “a” or “an according to the word?
- like
f(apple)# => an apple f(carpet)#=> a carpet
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Look here http://deveiate.org/projects/Linguistics/wiki/English and check out this question
If you need something simpler, something that will for instance prepend “an” if a word starts with vowel, you can use my one liner:
Put this in a file
prepend.rbinconfig/initializersfolder of your application.Then you will be able to use