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

NAME

Lingua::RU::Preposition - linguistic function for prepositions in Russian.

VERSION

Version 0.02

DESCRIPTION

Lingua::RU::Preposition is a perl module that provides choosing proper form of varying Russian prepositions.

SYNOPSIS

    use Lingua::RU::Preposition qw/:all/;

    # Following string contains cyrillic letters
    print ob, 'мне'; # prints 'обо' (obo)
    print choose_preposition_by_next_word 'из', 'огня'; # prints 'из' (iz)

TO DO

Check rules by dictionaries and correct if needed.

EXPORT

Function choose_preposition_by_next_word exported by default.

Also you can export only short aliases for subs

    use Lingua::RU::Preposition qw/:short/;

Or everything: subs and aliases:

    use Lingua::RU::Preposition qw/:all/; # or
    use Lingua::RU::Preposition qw/:subs :short/;

FUNCTIONS

choose_preposition_by_next_word

Chooses preposition by next word and returns chosen preposition.

Expects 2 arguments: preposition and next_word. Preposition should be string with shortest of possible values. Available values of preposition are: 'без', 'в', 'из', 'из-под', 'к', 'над', 'о', 'от', 'пред', 'перед', 'под' and 'с'.

There is an aliases for calling this subroutine with common preposition:

bezo

bezo is an alias for choose_preposition_by_next_word 'без',

This preposition can be used with some words in both forms, they are correct. Example: “без всего” (bez vsego) and “безо всего” (bezo vsego) both are correct. If possible function return long form.

izo

izo is an alias for choose_preposition_by_next_word 'из',

izpodo

izo is an alias for choose_preposition_by_next_word 'из-под',

ko

ko is an alias for choose_preposition_by_next_word 'к',

nado

nado is an alias for choose_preposition_by_next_word 'над',

ob and obo

ob and obo are aliases for choose_preposition_by_next_word 'о',

oto

oto is an alias for choose_preposition_by_next_word 'от',

podo

podo is an alias for choose_preposition_by_next_word 'под',

predo

predo is an alias for choose_preposition_by_next_word 'пред',

peredo

peredo is an alias for choose_preposition_by_next_word 'перед',

so

so is an alias for choose_preposition_by_next_word 'с',

vo

vo is an alias for choose_preposition_by_next_word 'в',

These aliases are not exported by default. They can be expored with tags :short or :all.

Example of code with these aliases:

    use Lingua::RU::Preposition qw/:short/;

    map {
        print ob, $_;
    } qw(
        арбузе баране всём Елене ёлке игле йоде
        мне многом огне паре ухе юге яблоке
    );

    map {
        print so, $_;
    } qw(
        огнём водой
        зарёй зноем зрением зябликом
        садом светом слоном спичками ссылкой
        Стёпой стаканом сухарём сэром топором
        жарой жбаном жратвой жуком
        шаром шкафом шлангом шубой
    );

AUTHOR

Alexander Sapozhnikov, <shoorick at cpan.org>

BUGS

Please report any bugs or feature requests to bug-lingua-ru-preposition at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-RU-Preposition. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Lingua::RU::Preposition

You can also look for information at:

SEE ALSO

Russian translation of this documentation available at RU/Lingua/RU/Preposition.pod

COPYRIGHT & LICENSE

Copyright 2010-2014 Alexander Sapozhnikov.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.