I am trying to create an program similar to ELIZA. My preference is to implement this project in a general language such as ruby, java, C++. is there some framework (open source would be great) available for any of these languages ?
A framework for a chatbot... no. A chatbot is a serious field, requiring teams of computer scientists many years to develop. There is no frame that can help besides the general purpose ones that come with them (the string libraries would be a great place to start).
To my mind, the most simple way to work on bots actually is to use gaelyk, a groovy framework to develop applications on top of google app engine.
Indeed, using google app engine, you gain a quite easy to use server environment, complete with high load support.
And gaelyk provides some very cool improvements over google app engine jabber handling.
Even better, you replace Java language with Groovy, which is more or less compatible, but with very nice enhancements.
There are plenty of frameworks available for IRC-bots, but not specificly a chat-bot. Ruby has a great resource for quickly finding popular libraries/frameworks Ruby-toolbox.com
If you want something that is MVC-based I can recommend Autumn. If you want something a little more lightweight take a look at Isaac or Cinch. I've worked with all libraries before and work as expected.
At the heart of a chat bot there is a natural language processor (NLP), the engine implements algorithms that would break a sentence entered by a human (e.g plain English) to a series of token the computer can process.
while I am not familiar with a chat bot framework there are several open source NLP engines you can utilize to implement a chat bot:
for example Open NLP
googling for "natural language processor" will point you to other sources