Earley 识别器到 Earley 解析器

发布于 2024-10-10 14:46:24 字数 294 浏览 6 评论 0原文

我设法创建了 Earley 识别器,一切正常。我有所有适当的情况。但我只能用它来决定单词是否被语法接受。如何让它解析?我需要一些文章或解释,似乎我需要与产生新情况的情况建立关联。任何帮助将不胜感激。

我的实现完全基于: http://www.cs.uvic.ca /~nigelh/Publications/PracticalEarleyParsing.pdf

I managed to create Earley recognizer, everything works fine. I have all proper sets of situation. But I only can use it to decide if word is accepted by grammar. How to make it to parse? I need some article or explanation, it seems that I need to create associations to situations that made new situations. Any help would be appreciated.

My implementation it's based exactly on: http://www.cs.uvic.ca/~nigelh/Publications/PracticalEarleyParsing.pdf

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

也只是曾经 2024-10-17 14:46:24

从 Earley 识别器生成解析森林是很棘手的。有这张纸
“识别不是解析——三次识别器的 SPPF 式解析”解释道
Earley 的解析器版本不正确,然后展示如何生成
从 Earley 识别器解析森林。

http://www.sciencedirect.com/science/article/pii/S0167642309000951

Parse forest generation from Earley recognizers is tricky. There is this paper
"Recognition is not parsing — SPPF-style parsing from cubic recognisers" that explains
that Earley's parser version is incorrect and then shows how to generate
parse forests from Earley recognizers.

http://www.sciencedirect.com/science/article/pii/S0167642309000951

番薯 2024-10-17 14:46:24

每当你进行推理时,请记住你来自哪里,即。使用哪些物品来形成新物品。然后可以通过探索跨越整个输入的顶部元素来找到解析森林。如果您正在使用二义性语法进行解析,您还应该考虑二义性包装,即。不要将(局部)等效分析重新组合在一起。

我真的推荐 Klaas Sikkel 的优秀著作《Parsing Schemata》,了解理论方面的内容。

Whenever you do an inference, keep track of where you came from, ie. what items where used to form the new item. Then the parse forest can be found by exploring the top element spanning the entire input. If you are parsing with ambigous grammars, you should also consider ambiguity packing, ie. do not recombine (locally) equivalent analyses together.

I really recommend Klaas Sikkel's excellent book "Parsing Schemata" for the theoretical side of things.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文