处理和理解句子
我正在尝试编写一个简单的代码来处理句子中的单词以形成含义。很长一段时间以来,我一直在尝试开发一种好的算法,但无论我如何尝试,该算法都非常复杂且冗长。如果您有一些建议,我将不胜感激。谢谢
I am trying to write a simple code that can process words in a sentence to form meaning. I have been trying to develop a good algorithm for a long while now, and however I try to do it the algorithm is scaringly tending to be too complex and long. Please if you have some suggestions, I'd appreciate. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在讨论自然语言处理(NLP)领域。这是一个非常复杂的问题,也是一个活跃的研究领域。
可以肯定地说,永远不会有一种简单的方法来解析一般的英语句子,更不用说建立意义了。
苏塞克斯大学信息学院有一套NLP 在线讲座可能会帮助您理解一些使这个问题变得如此困难的问题。
You are discussing the field of Natural Language Processing (NLP). It is a very complex issue, and an area of active research.
It is safe to say there will never be a simple way of parsing a general English sentence, let alone establishing meaning.
The School of Informatics at the Univeristy of Sussex has a set of NLP lectures online that may help you to understand some of the issues which make this such a hard problem.
事实证明,算法一定很复杂,而且时间很长,因为大脑实际上是复杂而深刻的。我的代码已经取得了进步,但这并不容易。我的方法是使用一个信息数据库,通过检查每个句子中的每个单词及其含义+关联来进行分析,但无论我多么努力,我发现理解只能是模拟的。例如:
我的口袋里装满了虫子。
将被理解为:
含义:
含义
错误的单词数据库(名词)是:
错误(动物)< /em>
重要性:相对-生物学;危险:2;期望值:0;
Bug(设备)
从上面至少可以推导出两个模拟的含义,算法进行智能猜测,开始一系列问题,以找出确切的含义。
Well, turned out the algorithm has to be complex and long since the brain is actually complex and deep. I have made advances with my code but it's nothing easy. My approach was to use an information database which is analyzed by inspecting every words in each sentence and their meanings + associations but no matter how hard I try, I figured out understanding can only be simulated. For instance:
My pocket is full of bugs.
Will be understood as:
Implications:
Implications
The word database for bug (NOUN) being:
Bug (Animal)
Importance: Relative - Biology; Danger: 2; Desirability: 0;
Bug (Device)
The two simulated meanings at least can be deduced from the above and the algorithm makes an intelligent guess to begin a series of questions in order to find out exactly what is meant.