百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

verbs

> 编程语言
开源

Ruby(和 Rails)英语动词变形

271 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Ruby(和 Rails)英语动词变形

Verbs

Conjugates most common english verbs for all persons, tenses, standard aspects, and modern moods (with active diathesis). Standard and exceptional spelling rules are obeyed.

ruby
Verbs::Conjugator.conjugate :be, :tense => :past, :person => :second, :plurality => :singular, :aspect => :perfective
# => :were
'be nice'.verb.conjugate :subject => 'Matz'
# => "Matz is nice"
:sleep.verb.conjugate :tense => :future, :person => :first, :plurality => :singular, :aspect => :progressive, :subject => true
# => :"I will be sleeping"

Installation

bash
gem install verbs

Options

This library takes a rather strict view of English verb conjugation.

:tense

One of :past, :present, or :future. Defaults to :present.

:person

One of :first, :second, or :third. Defaults to :third.

:plurality

Either :singular or :plural. Defaults to :singular.

:aspect

One of :habitual, :perfect, :perfective, :progressive, or :prospective. Defaults to :habitual (:perfective for past tense).

See below for a guide to verb aspect.

:mood

One of :indicative, :imperative, or :subjunctive. Defaults to :indicative.

:subject

Set this to a string to prepend the conjugated verb with it. When set to true, a standard personal pronoun will be used.

:diathesis

One of :active or :passive. Defaults to :active.

Tense/aspect quick reference

EXAMPLE TENSE ASPECT
I used to accept past habitual
I had accepted past perfect
I accepted past perfective
I was accepting past progressive
I was about to accept past prospective
I accept present habitual
I have accepted present perfect
I am having accepted present perfective
I am accepting present progressive
I am about to accept present prospective
I will accept future habitual
I will have accepted future perfect

Acknowledgements

  • Lingua::Conjugate
  • Pat Byrd and Tom McKlin
  • Rick Harrison
  • Anatoli Makarevich for #6
  • Nikita Kamaev for #35

Copyright

Copyright (c) 2012 Andy Rossmeissl. See LICENSE for details.

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyconjugationenglishgrammarruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言