开发者

Quiz Generator using NLTK/Python

The goal of this application is produce a system that can generate quizzes automatically. The user should be able to supply any word or phrase they like (e.g. "Sachin Tendulkar"); the system will then look for suitable topics online, identify a range of interesting facts, and rephrase them as quiz questions.

If I have the sentence "Sachin was born in year 1973", how can I rephras开发者_如何学运维e it to "Which Year was sachin born?"


In the general case, this is a very hard open research question. However, you might be able to get away with a simple solution a long as your "facts" follow a pretty simple grammar.

You could write a fairly simple solution by creating a set of transformation rules that act on parse trees. So if you saw a structure that matched the grammar for "X was Y in Z" you could transform it to "Was X Y in Z ?", etc. Then all you would have to do is parse the fact, transform, and read off the question that is produced.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜