php文本分析

I need to design a page. where user will upload some word doc and type few questions, and provide multiple answers of that question. This question is related to doc he has just uploaded. Now I have to analyse that doc and select best answer from options (answer) he has provided.

I was researching and found this. http://nlp.lsi.upc.edu/freeling/index.php?option=com_content&task=view&id=12&Itemid=41

Can any one refer some lib or best way to do the job . I know its not simple, but any help is welcome.