rossmeissl / verbs Goto Github PK
View Code? Open in Web Editor NEWEnglish verb conjugation for Ruby (and Rails)
Home Page: https://rubygems.org/gems/verbs
License: MIT License
English verb conjugation for Ruby (and Rails)
Home Page: https://rubygems.org/gems/verbs
License: MIT License
Verbs like issue and construe.
irb(main):002:0> Verbs::Conjugator.conjugate(:issue)
=> "issues" # ok
irb(main):001:0> Verbs::Conjugator.conjugate(:issue, tense: :past)
=> "issueed" # redundant e
Latest gem version. The thing that makes it fail appears to be the capitalization. When I make it lowercase, i.e. "be near" it works correctly. "Be Near" fails.
2.4, 2.5, 2.6, 2.7?
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
@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?
For all tenses, the progressive gives "bing" instead of "being" for to be.
'do'.verb.conjugate(:person => :third)
# => 'dos'
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?
If possible
caleon@fc6ae85
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".
Hi,
could you please push tags to GitHub? The latest available is 2.1.4
"He usually been" should be "He was usually"
> Verbs::Conjugator.conjugate :be, tense: :past, aspect: :progressive
=> "was bing"
Should be "was being".
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.
"I am having accepted" and "I will be having accepted" can never occur in English. The perfect would be used for both. "I have accepted" or "I will have accepted."
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"
irb(main):002:0> Verbs::Conjugator.conjugate(:mimic)
=> "mimics" # OK
irb(main):001:0> Verbs::Conjugator.conjugate(:mimic, tense: :past)
=> "mimicced" # need to fix
> 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.
This library needs a :mood
option, with :indicative
as the default and :subjunctive
and :imperative
as other options.
2.7.0 :001 > 'deliver'.verb.conjugate(tense: :past, aspect: :perfective)
=> "deliverred"
The past tense of deliver should be delivered, not deliverred.
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.
Would you accept a PR that adds the passive voice? I see a stub for it here:
https://github.com/rossmeissl/verbs/blob/master/lib/verbs/conjugator.rb#L43
There may be more.
%w(
consider
dishonor
inherit
target
)
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?
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
)
The irregular verb 'know' seems to not be conjugating incorrectly (i.e. know instead of known and knowwing instead of knowing)
irb(main):001:0> Verbs::Conjugator.conjugate(:lie, aspect: :progressive, tense: :past)
=> "was liying"
irb(main):002:0> Verbs::Conjugator.conjugate(:lie, aspect: :progressive)
=> "is liying"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.