Hi Behnamy,
The solution to the problem you are trying to solve is a "complete subset" of artificial intelligence but it is completely different from the concept of AI.
It is called natural language processing and I've done something like that in java (if you are familiar with java, then please check here: http://github.com/Samshal). It is an huge field of study where you focus on things like Machine translation, Language Modeling, string Lemmatization, part of speech tagging, computational linguistics, text Parsing and so on.
If what you need is a quick solution for a problem you have at hand, you can easily check out this library: http://php-nlp-tools.com/ . It is a widely used library for natural language processing in php, it has a huge community behind it with a lot of support.
But if you are looking into doing a research, then you may be in luck cause I'm also working on something similar currently
check here: http://github.com/Samshal for a part-of-speech tagging and string lemmatization project I'm working on, it's still been developed but the documentation is kind of comprehensive enough
Or send an email to <
[email protected]> so I can share some of my findings with you and we'ld talk more about algorithms for natural language processing