Lingua::RU::Preposition - linguistic function for prepositions in Russian.
Version 0.02
Lingua::RU::Preposition is a perl module that provides choosing proper form of varying Russian prepositions.
use Lingua::RU::Preposition qw/:all/; # Following string contains cyrillic letters print ob, 'мне'; # prints 'обо' (obo) print choose_preposition_by_next_word 'из', 'огня'; # prints 'из' (iz)
Check rules by dictionaries and correct if needed.
Function choose_preposition_by_next_word exported by default.
choose_preposition_by_next_word
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/;
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 is an alias for choose_preposition_by_next_word 'без',
bezo
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 is an alias for choose_preposition_by_next_word 'из',
izo
choose_preposition_by_next_word 'из',
izo is an alias for choose_preposition_by_next_word 'из-под',
choose_preposition_by_next_word 'из-под',
ko is an alias for choose_preposition_by_next_word 'к',
ko
choose_preposition_by_next_word 'к',
nado is an alias for choose_preposition_by_next_word 'над',
nado
choose_preposition_by_next_word 'над',
ob and obo are aliases for choose_preposition_by_next_word 'о',
ob
obo
choose_preposition_by_next_word 'о',
oto is an alias for choose_preposition_by_next_word 'от',
oto
choose_preposition_by_next_word 'от',
podo is an alias for choose_preposition_by_next_word 'под',
podo
choose_preposition_by_next_word 'под',
predo is an alias for choose_preposition_by_next_word 'пред',
predo
choose_preposition_by_next_word 'пред',
peredo is an alias for choose_preposition_by_next_word 'перед',
peredo
choose_preposition_by_next_word 'перед',
so is an alias for choose_preposition_by_next_word 'с',
so
choose_preposition_by_next_word 'с',
vo is an alias for choose_preposition_by_next_word 'в',
vo
choose_preposition_by_next_word 'в',
These aliases are not exported by default. They can be expored with tags :short or :all.
:short
:all
Example of code with these aliases:
use Lingua::RU::Preposition qw/:short/; map { print ob, $_; } qw( арбузе баране всём Елене ёлке игле йоде мне многом огне паре ухе юге яблоке ); map { print so, $_; } qw( огнём водой зарёй зноем зрением зябликом садом светом слоном спичками ссылкой Стёпой стаканом сухарём сэром топором жарой жбаном жратвой жуком шаром шкафом шлангом шубой );
Alexander Sapozhnikov, <shoorick at cpan.org>
<shoorick at cpan.org>
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.
bug-lingua-ru-preposition at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Lingua::RU::Preposition
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-RU-Preposition
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Lingua-RU-Preposition
CPAN Ratings
http://cpanratings.perl.org/d/Lingua-RU-Preposition
Search CPAN
http://search.cpan.org/dist/Lingua-RU-Preposition/
Russian translation of this documentation available at RU/Lingua/RU/Preposition.pod
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.
To install Lingua::RU::Preposition, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::RU::Preposition
CPAN shell
perl -MCPAN -e shell install Lingua::RU::Preposition
For more information on module installation, please visit the detailed CPAN module installation guide.