简体   繁体   English

什么是Rails插件或Ruby gem来自动修复英语语法?

[英]What's a Rails plugin, or Ruby gem, to automatically fix English grammar?

Facebook just re-launched Comments, with a automatic grammar fixing feature. Facebook刚刚重新启动了评论,具有自动语法修复功能。

What does the grammar filter do? 语法过滤器有什么作用?

  • Adds punctuation (eg periods at the end of sentences) 添加标点符号(例如句子末尾的句点)
  • Trims extra whitespace Auto cases words (eg capitalize the first word of a sentence) 修剪额外的空白自动案例单词(例如,将句子的第一个单词大写)
  • Expands slang words (eg plz becomes please) 扩大俚语(例如,PLZ变为请)
  • Adds a space after punctuation (eg Hi,Cat would become Hi, Cat) 在标点符号后添加空格(例如Hi,Cat会变成Hi,Cat)
  • Fix common grammar mistakes (eg convert 'dont' to 'don't') 修复常见的语法错误(例如将'不要'转换为'不要')

What is an equivalent plugin or gem? 什么是等效的插件或宝石?

I don't know of anything with those particular features. 我不知道有什么特别的功能。

However, you might look at Ruby LinkParser , which is a Ruby wrapper for the Link Grammar parser developed by academics and used by the Abiword project for grammar checking. 但是,您可以查看Ruby LinkParser ,它是由学者开发并由Abiword项目用于语法检查的Link Grammar解析器的Ruby包装器。 (Note that "link" in Link Grammer parser doesn't refer to HTML links, but rather to a structure that describes English syntax as a set of links between words). (请注意,Link Grammer解析器中的“link”不是指HTML链接,而是指将英语语法描述为单词之间的一组链接的结构)。

Here's another interesting checker , written in Ruby, which is designed to check LaTex files for some of the problems you mention (plus others). 这是另一个有趣的检查器 ,用Ruby编写,旨在检查LaTex文件中提到的一些问题(以及其他问题)。

您可能对Gingerice感兴趣,它似乎可以满足您的需求!

"After the Deadline" is a complete (free) grammar checking service. “截止日期后”是一个完整的(免费)语法检查服务。 Someone has already written a Ruby wrapper for it. 有人已经为它编写了一个Ruby包装器。

https://github.com/msepcot/after_the_deadline https://github.com/msepcot/after_the_deadline

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM