I tried to search a lot about this but all i could find was links to NLP libraries and AIML or chatbot APIs. I want to start from scratch and analyze the sentences myself so that i can write a basic chat bot that gives human like responses. Could someone please point to some links/research papers/ tutorials/videos for this?
答案 0 :(得分:2)
Without using NLP libraries you'll have to write some of their functionality yourself. Although this can be educational you should know it can also be very time consuming.
Some academic resources:
Programming/practical resources:
答案 1 :(得分:0)
当您使用AIML时,只需编写一些您想要匹配的模式即可开始使用。想象一下,您想要以主语动词对象的形式分析最简单的句子形式。使用AIML v2,您可以定义主题,动词和对象的集合。为了使事情变得非常简单,主题和对象集可以包含简单的对象(猫,狗,老鼠,帽子,垫子,奶酪),动词集可以是吃饭,坐等等。你的AIML将是:
object._meta.get_fields()
像“坐在垫子上的猫”或“狗吃了骨头”这样的输入会随机产生输出,例如“我喜欢猫”,“我讨厌狗”等。显然你需要大大扩展模板逻辑以有用的方式分析句子。
请注意这是一个非常基本的例子,目的是展示AIML模式匹配如何让您快速获得一些东西,然后可以改进。