算法的英语自然的句子 [英] Algorithm for Natural-Looking Sentence in English Language

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

问题描述

我要建,做句子检查的应用程序。你知不知道是否有任何的DLL在那里,认识到句子,它们的逻辑,正确组织句子?就像把话说在一个句子到一个正确的句子。

I'm building an application that does sentence checking. Do you know are there any DLLs out there that recognize sentences and their logic and organize sentences correctly? Like put words in a sentence into a correct sentence.

如果它没有,也许你可以建议的搜索字词,我可以研究。

If it's not available, maybe you can suggest search terms that I can research.

推荐答案

有东西叫做语言模型和正克。我会尽力就会解释它们是什么。 假设你有正确的英语句子的巨大coolection。让我们选择其中之一:

There are things called language model and n-gram. I'll try shortly explain what they are. Suppose you have a huge coolection of correct english sentences. Let's pick one of them:

敏捷的棕色狐狸跳过懒狗。现在让我们看一下它的话(被称为双字母组)的所有对: (中,快)(快速,棕色)(棕色,狐狸)(狐狸,跳转)等等... 有一个很大的句子,我们将有一个巨大的双字母组的数量。我们现在采取的独特的人并计算其频率的频道(时间数字,我们看到它在正确的句子)。 我们现在有,说
(下称,快) - 500
('快',棕色) - 53

The quick brown fox jumps over the lazy dog. Let's now look at all the pairs of words (called bigrams) in it: (the, quick), (quick, brown), (brown, fox), (fox, jumps) and so on... Having a huge collection of sentences we will have a huge number of bigrams. We now take unique ones and count their frequences (number of time we saw it in correct sentences). We now have, say
('the', quick) - 500
('quick', brown) - 53

双字母组与它们的频率称为一个语言模型。它展示了如何常用词的某种组合。

Bigrams with their frequencies called a language model. It shows you how common a certain combination of words is.

所以,你可以建立你的话所有可能的句子的计数的账户语言模型每个人走的重量。句子的最大重量将是你所需要的。

So you can build all the possible sentences of your words an count a weight of each of them taking in account language model. A sentence with the max weight is going to be what you need.

如果采取双字母组和他们的频率?好了,<一个href="http://googleresearch.blogspot.com/2006/08/all-our-n-gram-are-belong-to-you.html#!/2006/08/all-our-n-gram-are-belong-to-you.html"相对=nofollow>谷歌有它。 可以使用不只是一个字对,但三元等。它可以让你建立更多的类似人类的句子。

Where to take bigrams and their frequencies? Well, google has it. You can use not just a pair of words, but triples and so on. It will allow you to build more human-like sentences.

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

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