用计算机AI算法写句子? [英] Computer AI algorithm to write sentences?

查看:111
本文介绍了用计算机AI算法写句子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在搜索有关算法信息的信息,以便在创建以普通人类语言(例如英语)有效的句子时处理文本句子或遵循结构.我想知道是否可以在该领域中学习或开始使用的项目.

I am searching for information on algorithms to process text sentences or to follow a structure when creating sentences that are valid in a normal human language such as English. I would like to know if there are projects working in this field that I can go learn from or start using.

例如,如果我给一个程序一个名词,并为其提供一个词库(用于相关单词)和词性(以便它理解每个单词在句子中的位置),它是否可以创建一个随机的,有效的句子?

For example, if I gave a program a noun, provided it with a thesaurus (for related words) and part-of-speech (so it understood where each word belonged in a sentence) - could it create a random, valid sentence?

我敢肯定,这类研究有很多小节,因此任何潜在的线索都是很好的.

I'm sure there are many sub-sections of this kind of research so any leads into this would be great.

推荐答案

您要查找的字段称为自然语言生成,这是自然语言处理的子字段 http://en.wikipedia.org/wiki/Natural_language_processing

The field you're looking for is called natural language generation, a subfield of natural language processing http://en.wikipedia.org/wiki/Natural_language_processing

根据您希望句子的良好程度,句子的生成是非常容易的还是非常困难的.当前,没有程序能够生成关于给定名词(即使有同义词库)的100%明智的句子-如果那是您的意思.

Sentence generation is either really easy or really hard depending on how good you want the sentences to be. Currently, there aren't programs that will be able to generate 100% sensible sentences about given nouns (even with a thesaurus) -- if that is what you mean.

另一方面,如果您对有时是不合语法的废话感到满意,那么您可以尝试使用基于n元语法的句子生成器.这些只是将倾向于顺序出现的单词链接在一起,有时3-4-gram生成器看起来还不错(尽管您会认识到它们是生成大量垃圾邮件的原因).

If, on the other hand, you would be satisfied with nonsense that was sometimes ungrammatical, then you could try an n-gram based sentence generator. These just chain together of words that tend to appear in sequence, and 3-4-gram generators look quite okay sometimes (although you'll recognize them as what generates a lot of spam email).

这是使用NLTK的基于n-gram的生成基础知识的简介: http://www.nltk.org/book/ch02 .html#generating-random-text-with-bigrams

Here's an intro to the basics of n-gram based generation, using NLTK: http://www.nltk.org/book/ch02.html#generating-random-text-with-bigrams

这篇关于用计算机AI算法写句子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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