I would like to know where would you begin for doing natural language processing in Ruby. I am a C# programmer, and although I found this C# tutorial:
Writing Your First Domain Specific Language, I would like to take this opportunity to learn the Ruby language, implementing something similar to:
- For question 1, the value is 3.0 if (question 1 answer is C,D), else 2.0.
- For question 3, the value is (question 1 value * 0.75) if (question 1 answer is B).
- For question 3, the value is (question 1 value * 0.50) if (question 1 answer is B) and (question 2 answer is C).
- For question 3, the default value is 3.0.
Thanks in advance. 🙂
If you really want to do natural language processing (you mention it in the text), I’d advise using OpenNLP with JRuby. I did that last year and it worked out pretty well.
For DSLs, there are a ton of Ruby-specific tutorials on the web, just use your favorite search engine to find them. Book wise I’d recommend Russ Olson’s “Eloquent Ruby” and Paola Perotta’s “Metaprogramming Ruby”. After those 2 books you should know everything you need to know about writing DSLs and have learned a lot of very good Ruby as a side-effect.