Is there any ruby method to convert string into sentence.
Like this is a sentence
to This is a sentence.
or
i m happy
to I'm happy
2
2 Answers
a="this is a sentence"
puts a.capitalize
output
This is a sentence
7
I know capitalize works in this case. how about “i m happy” => “I’m happy.”
–@sreerajnyros modify your requirements in your post and try to add all cases
There is no such method to convert some line into meaningful English lines.
– Gopal@PavneetSingh The way he has been asking questions seems to be he wants to convert a English lines into meaningful English lines, but there is no such method, that’s Andrew Li said ‘No there is not’
– Gopal
I found gingerice gem that might apt for my question.
BTW thank you all for having time for me.
Its working as expected for me.
Regards,
Sreeraj
1
Any third party gem obviously can’t apt for your question, since the question clearly stated “any ruby method.” Downvoted.
@Andrew, such answers are not useful without argument.
@CarySwoveland picky mode on? 🙂 What argument do you expect to see here besides “because it is not»?