Giter Club home page Giter Club logo

verbs's Introduction

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.

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

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

Copyright

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

verbs's People

Contributors

danryan avatar dwbutler avatar jbpros avatar jeidsath avatar kippmr avatar makaroni4 avatar michaeldever avatar nerixim avatar pienkowb avatar rossmeissl avatar seamusabshere avatar xuhdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

verbs's Issues

Add missing irregular verbs

I've found that the following verbs aren't in the irregular verbs' list. Some of them are uncommon but it's better to have them than not.

%w(
 alight
 arise
 crow
 can
 dwell
 gnaw
 grip
 geld
 lean
 may
 melt
 smell
 wet
 bust
 forecast
 slink
 abide
 beget
 chide
 clothe
 foresee
 offset
 partake
 preset
 relay
 spoil
 strew
 sweat
 typeset
 undergo
 withdraw
 backslide
 browbeat
 crossbreed
 daydream
 disprove
 foretell
 frostbite
 hand-feed
 handwrite
 hew
 inbreed
 inlay
 input
 interbreed
 interweave
 interwind
 jerry-build
 lip-read
 miscast
 misdeal
 misdo
 mishear
 mislay
 mislead
 mislearn
 misread
 misset
 misspeak
 misspend
 misteach
 misunderstand
 miswrite
 outbid
 outbreed
 outdo
 outdraw
 outdrink
 outdrive
 outfight
 outfly
 outgrow
 outleap
 outlie
 outride
 outrun
 outsell
 outshine
 outshoot
 outsing
 outsit
 outsleep
 outsmell
 outspeak
 outspeed
 outspend
 outswear
 outswim
 outthink
 outthrow
 outwrite
 overbid
 overbreed
 overbuild
 overbuy
 overdraw
 overdrink
 overeat
 overfeed
 overhang
 overhear
 overlay
 overpay
 override
 overrun
 oversee
 oversell
 oversew
 overshoot
 oversleep
 overspeak
 overspend
 overspill
 overthink
 overwind
 overwrite
 prebuild
 predo
 premake
 prepay
 presell
 preshrink
 proofread
 quick-freeze
 reawake
 rebid
 rebind
 rebroadcast
 rebuild
 recast
 recut
 redeal
 redo
 redraw
 refit
 regrind
 regrow
 rehang
 rehear
 reknit
 relearn
 relight
 remake
 repay
 reread
 rerun
 resell
 resend
 resew
 retake
 reteach
 retear
 retell
 rethink
 retread
 retrofit
 rewear
 reweave
 rewed
 rewet
 rewin
 rewind
 rewrite
 roughcast
 sand-cast
 seekaw
)

rubygems not up to date with github version

Thanks for making this gem!

I noticed that the version you have on rubygems doesn't seem to have all fixes that are on github.

I installed your gem this morning, here's a piece of an interaction pattern:
image

'color' is not conjugated correctly

Hi,

when using the following statement to conjugate the verb '(to) color':

'color'.verb.conjugate(:tense => :past, :person => :third, :plurality => :singular, :aspect => :perfective)

I'd expect to get 'colored', but instead get 'colorred'.

Best regards,
Mathias

CI is failing

@nerixim since you set up the automatic testing environment, would you mind please taking a look to see why tests are failing for Ruby versions 2.5, 2.6, and 2.7?

Progressive form of verb ending in the letter "e"

Sorry I haven't had a chance to really dig into the code yet and help out. It seems though that verbs ending in "e" are misspelled in the progressive form. For example "hide => hideing", "slide => slideing".

Inversion?

I believe (from looking at the code) that this library doesn't offer the ability to 'reverse' a conjugation — ie. turn 'Matz was' back into 'be' — but it looks as though it could.

Is this something you'd consider adding, or that you'd have any pointers as to how you'd want it completed?

Moods

This library needs a :mood option, with :indicative as the default and :subjunctive and :imperative as other options.

Irregular verbs (know)

The irregular verb 'know' seems to not be conjugating incorrectly (i.e. know instead of known and knowwing instead of knowing)

Issue with the word follow

Here's an example:

2.3.0 :013 > Verbs::Conjugator.conjugate 'follow', tense: :past, person: :second, aspect: :perfective, plurality: :plural
 => "followed" 
2.3.0 :014 > Verbs::Conjugator.conjugate 'follow', tense: :past, person: :second, aspect: :progressive, plurality: :plural
 => "followwing"

The latter should be following.

have/be missing in second person plural

There seem to be some issues with :have and :be in second person plural conjugations

past perfect -- "You accepted" should be "You had accepted"
past progressive -- "You accepting" should be "You were accepting"
past prospective "You about to accept" should be "You were about to accept"

etc.

Make the default aspect "Perfective"

> Verbs::Conjugator.conjugate :eat, tense: :past
 => "usually eaten"

If I am looking for the past tense of "eat", I want to be given "ate".

The habitual aspect is an unexpected default and far less common in English than the perfective. Common cases and expectations should comprise the defaults.

bing -> being

For all tenses, the progressive gives "bing" instead of "being" for to be.

Provide a changelog

Hi,

I appreciate the commit message

We need a major version release here because the default aspect for the past tense is now perfective.

but is it possible to have changelog/history?

Input is mutated

Input that is passed into the conjugator is mutated because of the use of concat. This causes unexpected errors if the same input is used later and expected to be the original value.

> verb = 'like'

> Verbs::Conjugator.conjugate(
  verb,
  tense:   :past,
  aspect:  :perfective
)
=> "liked"

> verb
=> "liked"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.