Rand Stats

Lingua::EN::Conjugate

github:kolikov

perl6-Lingua-EN-Conjugate

A Perl6 module that conjugates English verbs

Usage

 use Lingua::EN::Conjugate;

 my $verb = englishverb.new(bare => 'code', forms => <BeIng HaveEn>);
 for < I you he she it we you they > -> $s {
   for < p sp > -> $t {
     $verb.tense = $t;
     say $verb.conjugate( subject => $s );
   }
 }
 
 my @sentence = conjugate( bare => 'be', subject => 'it', interrogative => True );
 say @sentence ~ ' a function ?';

Object, Methods and details

Object englishverb must be created first with one only conmpulsory parameter

The object also accepts named parameters for method "conjugate at creation.

Method conjugate returns Array: accepts named parameters :

Method is-irreg returns Bool, accepts string default self bare

Function usage

Purpose And Notes

Warning, this is not a direct port of the Perl5 "Lingua-EN-Conjugate" module !

Instead of using fixed tense blocks to conjugate an English verb, this module uses notions of "forms" which can be combined. IE: The "Past Perfect Continuous/Progressive" of a verb is in this case, The "Perfect" and "Continuous" forms conbined and evaluated with the "Past Tense"

The notions used by the module:

SUBJECT:

The sentence's actor, any of I he she it we you they

TENSE:

The grammatical time of the action. "Time" is a physical notion, "Tense" a grammatical one. English has only 2 "Tense": Past and Present; The "Future" tense is a modality. Two Tenses are aviable: p = Present, sp = Past

MODALITY:

Allows speakers to evaluate a proposition relative to a set of other propositions (Necessity or Possibility). The "future" (will) stands for a Possibility. Modality is any of will shall may can.

VERB:

Conveys an action (bring, read, walk, run, learn), or a state of being (be, exist, stand).

VERBAL FORM:

Way in which a verb is structured in relation to time, BE+ING = Continuity, non-finite. HAVE+EN: Past event linked to the present, BE+EN: Passive verbal form Modality can be many of HaveEn BeIng BeEn

Speculative Todo List

Copyright © 2015 Nuguet Romuald under the Artistic License 2.0.