找出两个句子部分是否可以连接在一起的算法
我正在寻找一种可以将句子部分连接在一起的算法。因此,例如,它会知道
“喝掉它并点了第二杯”,
将能够遵循:
“他听了她所说的话并点了一杯酒”,
但是
“通过尝试知道什么”他无法理解,”
不会。
我熟悉 NLTK - 有什么建议吗?
I'm looking to build an algorithm that can join together sentence parts. So, for example, it would know that
"drank it down and ordered a second glass,"
would be able to follow:
"He listened to what she had to say and ordered a glass of wine,"
but
"by trying to know what he could not understand,"
would not.
I'm familiar with the NLTK - any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上被证明是无解的。代码必须理解单词的含义才能确定。您实际上要求的是一种上下文无关语法(http://en.wikipedia.org/wiki/Context-free_grammar),它对于人类语言来说根本不存在。
This is actually proven to be unsolvable. The code would have to have understanding of the meaning of the words to be sure. What you are effectively asking for is a Context-free Grammar (http://en.wikipedia.org/wiki/Context-free_grammar) which simply doesn't exist for human languages.