The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lingua::Zompist::Kebreni - Inflect Kebreni verbs

VERSION

This documentation refers to version 0.90 of Lingua::Zompist::Kebreni, released on 2002-05-19.

SYNOPSIS

  use Lingua::Zompist::Kebreni;

  $word = Lingua::Zompist::Kebreni->new('kanu');

  $inflection = $word->perfective;
  $inflection = $word->make_polite->benefactive->polite;

  $base = $word->base;
  $string = $word->to_string; # or use "$word"

DESCRIPTION

Overview

This module allows you to inflect Kebreni verbs. Kebreni is a language spoken on the fictional world of Almea, created by Mark Rosenfelder. It has a rather "interesting" verbal system (of which Mark says he's particularly proud).

The module has an object-oriented interface. To use it, first create an object by calling the new method and passing it the verb name in traditional orthography -- for example, 'kanu' or "z'ynu". Use the dictionary form (the imperfective) for this.

Now you can call various methods on this object. Each method, when successful, will return another object. This is useful becuause it is often necessary to chain method calls. For example, to form the volitional benefactive, call the 'benefactive' method on your verb object and then the 'volitional' method on the return value of the 'benefactive' method, for example, like this:

  $inflected = $word->benefactive->volitional;

The module also has an overloaded "" function, so if you use a Lingua::Zompist::Kebreni object in a string context, it will give you the string representation. So you could print out the volitional benefactive of 'kanu' like this:

  $inflected = Lingua::Zompist::Kebreni->new('kanu')
                                       ->benefactive
                                       ->volitional;
  print "The inflected form is $inflected\n";

You can also explicitly stringify an object by calling the to_string method on it.

Method calling order

You cannot call the object methods in any order. Rather, you must adhere to the following order when creating complex verb forms:

  1. make_polite

  2. benefactive / antiben

  3. volitional

  4. perfective

  5. dir2

  6. polite

  7. subordinate

See the individual documentation of each method to find out a bit more about what it does.

In general, polite and subordinating forms are mutually exclusive (since only the main, conjugated form of the verb in a clause will be marked for politeness), but they are presented as separate steps here because they do not have a close semantic relationship in the sense that benefactive and antibenefactive forms do (which are also mutually exclusive).

Methods

In general, methods return another Lingua::Zompist::Kebreni object when successful and croak if they have a problem.

new

This is the constructor for Lingua::Zompist::Kebreni objects. The most common calling method is as a class method; in this case, pass it the dictionary form of the verb you wish to inflect. You can also, optionally, pass in flags which will become the base flags of the verb. This is hardly ever necessary.

new can also be called as an object method; in this case, it can take up to three parameters. This is used internally but can also be used by end-users if desires. The first parameter is, again, the base verb; the second (optional) is flags which will be OR'ed into the flags of the object the method is called on; and the third (also optional) is an explicit base (this is used for verbs with suppletive polite forms, where the conjugation base is not the same as the dictionary base; in this case, the first parameter is the conjugation base and the third is the dictionary base which will be returned by the base method).

base

This returns the base (dictionary form) of the current verb.

flags

This returns the flags of the current verb form. Probably not very interesting except for developers.

null

This does nothing; it simply returns the object that it was called on. This can be useful, for example, if you are constructing a table of different verb forms by cycling through different possible inflections. Then instead of, say,

  $word
  $word->perfective
  $word->volitional
  $word->volitional->perfective

you could use

  $word->null->null
  $word->null->perfective
  $word->volitional->null
  $word->volitional->perfective

and have the same number of steps at each turn.

perfective

Forms the perfective form of a given word, given an imperfective form.

volitional

Forms the volitional form of a given word.

make_polite

If you wish to make the polite form of a verb, you need two steps. First, you must call make_polite as the first step, and then you must later call polite at the appropriate point (for example, after you have formed the volitional perfective, or whatever form you wanted). The reason for this is that some verbs have suppletive polite forms, which are substituted right at the beginning of the conjugation process.

The currently recognised irregular verbs and their supplective polite base forms are:

  verb    polite

  badu    seh'epu
  tasu    soru
  es'u    natu

polite

This is used to form the polite form of a verb. The verb form must have had make_polite called on it in the past.

If the current verb is the suppletive form of another verb, this operation is a null op[*]. In the interest of generality, it should always be called, even if the current verb is known to have a suppletive polite form.

[*] actually, not quite; this method still sets an internal flag on the word.

benefactive

This method forms the benefactive form of a verb. To form the benefactive-to-listener form, you must later call the ben2 method, which see.

dir2

This method changes a benefactive or antibenefactive form of a verb into the benefactive-to-listener or antibenefactive-to-listener form of the verb. Note that you do not, in general, call this method immediately after the benefactive or antiben method, since volitional and perfective may come in between as well.

antiben

This method forms the antibenefactive form of a verb. To form the antibenefactive-to-listener form, you must later call the ben2 method, which see.

subordinate

This forms the subordinating form of a given verb.

whodoes

This forms the "one who does" or "agent" form of a verb. This method, as well as the following ones, is called on the dictionary form of the verb (imperfective).

whodoesf

This forms the feminine "one who does" or "agent" form of a verb. This method is called on the dictionary form of a verb.

participle

This method forms a word form that means "that has been Xed", which is a bit like a past participle. For more information, see the Kebreni grammar.

action

Use this method to form the action related to a verb.

EXPORT

Nothing by default. However, the following flags can be imported explicitly, either individually or all together using the tag ':flags'. They're mostly for internal use only, however.

  BENEFACTIVE
  ANTIBEN
  VOLITIONAL
  PERFECTIVE
  DIR3
  POLITE
  SUBORDINATE
  SUPPLETIVE
  MADE_POLITE

DIAGNOSTICS

"Can apply -to-listener only to (anti)benefactive forms"

You called the dir2 method without first calling either of benefactive or antiben. This makes no sense, as -to-listener forms only exist for benefactive and antibenefactive forms.

See also "Method calling order".

"Can't make a%s form %s"

You apparently tried to call methods in the wrong order. See "Method calling order" for more information on which order to call methods in.

"Funny word '%s' does not end in -u or -y!"
"Funny word '%s' does not have a consonant in position %s!"
"Funny word '%s' does not have a vowel in position %s!"
"Funny word '%s' does not have vowels in positions %s and %s!"

You apparently called a method on a verb which does not look as if it has the right form. Check your spelling, or see whether it's really a Kebreni verb.

"Verb must be prepared with ->make_polite before calling ->polite"

Apparently, you wanted to form the polite form of a verb but forgot to call make_polite right at the beginning.

See also "Method calling order".

AUTHOR

Philip Newton, <pne@cpan.org>

SEE ALSO

http://www.zompist.com/kebreni.htm, Lingua::Zompist::Cadhinor, Lingua::Zompist::Verdurian

COPYRIGHT AND LICENCE

[This is basically the BSD licence.]

Copyright (C) 2001, 2002 by Philip Newton. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.