是否有已发布的自然语言生成语法?

发布于 2024-11-18 07:37:39 字数 308 浏览 2 评论 0原文

我有一些与自然语言处理有关的想法。我需要一些

S -> NP VP

不同的语法才能使用它们。

如果我尝试自己编写这些规则,这将是一件乏味且容易出错的事情。 有人曾经输入并发布过英语和其他自然语言的综合规则集吗?最好用 BNF、Prolog 或类似语法编写。

我的项目只涉及上下文无关语法,我对统计方法或机器学习不感兴趣——我需要系统地生成类似英语和类似Foobarian的句子。

如果您知道在哪里可以找到此类材料,我将非常感激。

I have some ideas to do with natural language processing. I will need some grammars of the

S -> NP VP

variety in order to play with them.

If I try to write these rules myself it will be a tedious and error-prone business. Has anyone ever typed up and released comprehensive rule sets for English and other natural languages? Ideally written in BNF, Prolog or similar syntax.

My project only relates to context-free grammars, I'm not interested in statistical methods or machine learning -- I need to systematically produce Engligh-like and Foobarian-like sentences.

If you know where to find such materiel, I'd very much appreciate it.

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

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

发布评论

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

评论(3

我做我的改变 2024-11-25 07:37:39

您可能需要查看 Attempto Controlled English 及其基于 Prolog 的工具。

由于统计解析在 90 年代初开始流行,除了特定问题领域之外,语法通常不是分布式的,而是源自分布式语料库,例如 Penn Treebank。如果您能掌握这一点(我相信示例是随 NLTK 一起分发的),您可以通过查看所有树片段并将它们转换为规则来“推出您自己的”语法。 (例如,如果您发现一个标记为 S 的节点,其子节点标记为 NPVP,您就知道应该存在一条规则 S< /em> -> NP VP 修剪不经常出现的规则。)

You might want to look at Attempto Controlled English and its Prolog-based tools.

Since statistical parsing came in vogue in the early 90s, grammars have usually not been distributed, except for specific problem domains, but derived from distributed corpora such as the Penn Treebank. If you can get a hold of that (I believe a sample is distributed with NLTK), you can "roll your own" grammar by looking at all tree fragments and translating them to rules. (E.g., if you find a node labeled S with children labeled NP and VP, you know there should be a rule S -> NP VP. Pruning the rules that occur infrequently would be a good idea.)

黒涩兲箜 2024-11-25 07:37:39

据我所知,最全面的英语上下文无关语法是:

Gazdar,Gerald;伊万·克莱因 (Ewan H. Klein)、杰弗里·K·普鲁姆 (Geoffrey K. Pullum)、伊万·A·萨格 (Ivan A. Sag)。 1985。广义短语结构语法。牛津:布莱克威尔。

还有一些基于规则但非上下文无关的语法可以在线免费获得,例如 Penn XTAG语法或 HPSG 英语资源语法

The most comprehensive context-free grammar for English that I know of is the one described in:

Gazdar, Gerald; Ewan H. Klein, Geoffrey K. Pullum, Ivan A. Sag. 1985. Generalized Phrase Structure Grammar. Oxford: Blackwell.

There are also several rule-based but non-context-free grammars freely available online, e.g., the Penn XTAG grammar or the HPSG English Resource Grammar.

oО清风挽发oО 2024-11-25 07:37:39

查看语法框架。它是一种用于多语言语法应用程序的函数式编程语言,附带约 30 种语言的库,其中包括英语。

Look into the Grammatical Framework. It is a functional programming language for multilingual grammar applications which comes with libraries for ~30 languages, among them English.

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