NAME
Lingua::EN::Conjugate - Conjugation of English verbs
SYNOPSIS
use Lingua::EN::Conjugate qw( conjugate conjugations );
print conjugate( 'verb'=>'look',
'tense'=>'perfect_prog',
'pronoun'=>'he',
'negation'=>'not' );
# he was not looking
my $go = conjugate( 'verb'=>'go',
'tense'=>[qw(past modal_perf)],
'modal'=>'might',
'passive' => 1 ) ;
# returns a hashref
my @be = conjugate( 'verb'=>'be',
'pronoun'=>[qw(I we)],
'tense'=>'past_prog' );
# returns an array
#pretty printed table of conjugations
print conjugations( 'verb'=>'walk', 'negation'=>'n_t' );
------------- PRESENT ------------- ---------- PRESENT_PROG -----------
I don't walk I am not walking
you don't walk you aren't walking
he doesn't walk he isn't walking
we don't walk we aren't walking
they don't walk they aren't walking
-------------- PAST --------------- ------------ PAST_PROG ------------
I didn't walk I wasn't walking
you didn't walk you weren't walking
he didn't walk he wasn't walking
we didn't walk we weren't walking
they didn't walk they weren't walking
------------- PERFECT ------------- ---------- PAST_PERFECT -----------
I haven't walked I hadn't walked
you haven't walked you hadn't walked
he hasn't walked he hadn't walked
we haven't walked we hadn't walked
they haven't walked they hadn't walked
---------- PERFECT_PROG ----------- -------- PAST_PERFECT_PROG --------
I haven't been walking I hadn't been walking
you haven't been walking you hadn't been walking
he hasn't been walking he hadn't been walking
we haven't been walking we hadn't been walking
they haven't been walking they hadn't been walking
-------------- MODAL -------------- ----------- MODAL_PROG ------------
I won't walk I won't be walking
you won't walk you won't be walking
he won't walk he won't be walking
we won't walk we won't be walking
they won't walk they won't be walking
----------- MODAL_PERF ------------ --------- MODAL_PERF_PROG ---------
I won't have walked I won't have been walking
you won't have walked you won't have been walking
he won't have walked he won't have been walking
we won't have walked we won't have been walking
they won't have walked they won't have been walking
------- CONJUNCTIVE_PRESENT ------- ----------- IMPERATIVE ------------
I not walk
you not walk don't walk
he not walk
we not walk let's not walk
they not walk
----------- PRESENT_DO ------------ ------------- PAST_DO -------------
I don't walk I didn't walk
you don't walk you didn't walk
he doesn't walk he didn't walk
we don't walk we didn't walk
they don't walk they didn't walk
------------- USED_TO -------------
I used to not walk
you used to not walk
he used to not walk
we used to not walk
they used to not walk
DESCRIPTION
This module constructs various verb tenses in English.
Thanks to Susan Jones for the list of irregular verbs and an explanation of English verb tenses http://www2.gsu.edu/~wwwesl/egw/grlists.htm.
- conjugate('verb'=> 'go' , OPTIONS)
-
In scalar context with tense and pronoun defined as scalars, only one conjugation is returned.
In scalar context with tense and pronoun undefined or defined as array refs, a hashref keyed by tense and pronoun is returned.
In array context, it returns an array of conjugated forms ordered by tense, then pronoun.
- verb
-
'verb'=>'coagulate'
The only required parameter.
- tense
-
'tense'=>'past' 'tense'=>['modal_perf', 'used_to']
If no 'tense' argument is supplied, all applicable tenses are returned.
- passive
-
'passive' => 1 'passive' => undef (default)
If specified, the passive voice is used. Some tenses, such as Imperiative, are disabled when the passive option is used.
- pronoun
-
'pronoun'=>'he' 'pronoun'=>[qw(I we you)]
If no 'pronoun' argument is supplied, all applicable pronouns are returned.
- question
-
'question' => 1 'question' => 0 (default)
In case you're playing Jeapordy
- negation
-
'negation'=> 'not' 'negation'=> 'n_t' 'negation'=> undef (default)
Changes "do" to "do not" or "don't" depending on which value you request. For words where you can't use "n't" (like "am") or where it feels clumsy or antique (like "may"), this will substitute "not" for "n_t" as appropriate.
- modal
-
'modal' => one of: may, might, must, should, could, would, will (default), can, shall.
Specifies what modal verb to use for the modal tenses.
http://www.kyrene.k12.az.us/schools/brisas/sunda/verb/1help.htm
- allow_contractions
-
'allow_contractions'=>1 allows "I am"->"I'm", "they are"->"they're" and so on 'allow_contractions'=>0 (default)
The negation rule above is applied before the allow_contractions rule is checked:
allow_contractions =>1, negation=>n_t : "he isn't walking"; allow_contractions =>0, negation=>n_t : "he isn't walking"; allow_contractions =>1, negation=>not : "he's not walking"; allow_contractions =>0, negation=>not " "he is not walking";
- conjugations()
-
returns a pretty-printed table of conjugations. (code stolen from L<Lingua::IT::Conjugate>)
EXPORT
None by default. You can export the following functions and variables:
conjugate
conjugations
@tenses
@pronouns
BUGS
TODO
HAVE TO + Verb
HAVE GOT TO + Verb
BE ABLE TO + Verb
OUGHT TO + Verb
BE SUPPOSED TO + Verb
AUTHOR
Russ Graham, russgraham@gmail.com