Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rossmeissl/verbs
English verb conjugation for Ruby (and Rails)
https://github.com/rossmeissl/verbs
conjugation english grammar ruby
Last synced: 6 days ago
JSON representation
English verb conjugation for Ruby (and Rails)
- Host: GitHub
- URL: https://github.com/rossmeissl/verbs
- Owner: rossmeissl
- License: mit
- Created: 2009-11-23T21:18:45.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2021-09-07T14:48:38.000Z (over 3 years ago)
- Last Synced: 2024-10-18T18:09:36.008Z (2 months ago)
- Topics: conjugation, english, grammar, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/verbs
- Size: 212 KB
- Stars: 268
- Watchers: 7
- Forks: 33
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://cpansearch.perl.org/src/RWG/Lingua-EN-Conjugate-0.308/lib/Lingua/EN/Conjugate.pm)
- [Pat Byrd and Tom McKlin](http://www2.gsu.edu/~wwwesl/egw/pluralsv.htm)
- [Rick Harrison](http://www.rickharrison.com/language/aspect.html)
- [Anatoli Makarevich](https://github.com/makaroni4) for [#6](https://github.com/rossmeissl/verbs/pull/6)
- [Nikita Kamaev](https://github.com/nerixim) for [#35](https://github.com/rossmeissl/verbs/pull/35)## Copyright
Copyright (c) 2012 Andy Rossmeissl. See [LICENSE](https://github.com/rossmeissl/verbs/blob/master/LICENSE) for details.