自然语言解析 [英] natural language parsing

查看:104
本文介绍了自然语言解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好晚上好:

i想做一个简单的解析,但我不知道要开始。

首先我得到文本并将其拆分为单词数组,然后该怎么办。



例如我有以下短语:



打开CD_Drive



结果将是:

打开 - >动词。

the - > det。

CD_Drive - >名词。





感谢您的帮助。

Hello guys good evening:
i want to make a simple parsing, but i have no idea to start.
first i get the text and split it to a words of array, then what can i do.

for example i have the following phrase :

"Open the CD_Drive"

the result will be:
Open --> Verb.
the --> det.
CD_Drive --> Noun.


thanks for help.

推荐答案

一旦你'已经通过EBNF和LALR1解析器和解析器生成器工作,如 Flex Bison 您可能想要查看<对于像 Alvin 这样的NLP,code>图表解析器,他们被某些人认为比其他方法具有更大的潜力。我的信息现在有点老了,所以你必须相信自己的研究。如果你想要一些认真的C ++解析技术,你也可以查看 Boost :: spirit 。这是令人费解的东西,但也很有趣。
Once you''ve worked your way through EBNF and LALR1 parsers and parser generators like Flex and Bison you might want to look at chart parsers for NLP like Alvin, they are or were thought by some to have greater potential than other approaches. My info is a little old now though so you''ll have to trust your own research. You could also look into Boost::spirit if you want some seriously C++ parsing technology. This is mind bending stuff but also a lot of fun.


请看我对这个问题的评论。您应该从配置要解析的语言开始。如果不能成为真正的自然语言,那就不应该。恰恰相反:想想它只是略微类似于真正的自然语言,但尽量让它变得尽可能简单和严格,除非你的问题没有希望。



一些参考文献:

http://en.wikipedia.org/ wiki / Backus%E2%80%93Naur_Form [ ^ ],

http://en.wikipedia.org/wiki/EBNF [ ^ ],

http://en.wikipedia.org/wiki/Parser [ ^ ]。



一些想法:

https://npmjs.org/package/ebnf-parser [ ^ ],

http://www.nongnu.org/bnf/ [ ^ ],

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/87a9c718-d549-48f6-a81d-795a349d4ce7 [ ^ ]。



这是一个.NET项目: http://ebnfnet.sourceforge.net/ [ ^ ]。



再次,这个话题太大了,无法给出明确的建议。更重要的是,这一切都取决于您的应用程序的范围和语言的复杂程度。也许,你需要更简单的东西,但需要自己完成。



请考虑我的建议主要是作为如何了解所涉及的内容以及获取一些内容的指示基本想法。



-SA
Please see my comments to the question. You should start with formulation of the language you want to parse. If cannot be a "real" natural language, and should not be. Just the opposite: think about making it only slightly resembling a "real" natural language, but try to make it as simple and strict as possible, unless you problem will be hopeless.

Some references:
http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form[^],
http://en.wikipedia.org/wiki/EBNF[^],
http://en.wikipedia.org/wiki/Parser[^].

Some ideas:
https://npmjs.org/package/ebnf-parser[^],
http://www.nongnu.org/bnf/[^],
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/87a9c718-d549-48f6-a81d-795a349d4ce7[^].

This is a .NET project: http://ebnfnet.sourceforge.net/[^].

Again, the topic is too big to give a definitive advice. More importantly, it all depends on how big is the scope of your application and complexity of your language. Maybe, you need something simpler, but made all by yourself.

Please consider my advice mostly as the directions on how to learn what''s involved and for getting some basic ideas.

—SA


这篇关于自然语言解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆