The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Lingua::RU::Inflect - Inflect russian names.


Version 0.06


Lingua::RU::Inflect is a perl module that provides Russian linguistic procedures such as declension of given names (with some nouns and adjectives too), and gender detection by given name.

Choosing of proper forms of varying prepositions which added in 0.02 now is unavailable because it moved to Lingua::RU::Preposition.


Inflects russian names which represented in UTF-8.

Perhaps a little code snippet.

    use Lingua::RU::Inflect;

    my @name = qw/Петрова Любовь Степановна/;
    # Transliteration of above line is: Petrova Lyubov' Stepanovna

    my $gender = detect_gender_by_given_name(@name);
    # $gender == FEMININE

    my @genitive = inflect_given_name(GENITIVE, @name);
    # @genitive == qw/Петровой Любови Степановны/;
    # Transliteration of above line is: Petrovoy Lyubovi Stepanovny

One-liners also can be used

    perl -Ilib -Mcommon::sense -MLingua::RU::Inflect=:all \
    -E 'say join " ", inflect_given_name(GENITIVE, qw/Перец Лев Ильич/)'
    # Перца Льва Ильича
    # Transliteration of above line is: Pertsa L'va Il'icha


1. Inflect any nouns, any words, anything...


Function detect_gender_by_given_name and detect_gender_by_given_name are exported by default.

Also you can export only case names:

    use Lingua::RU::Inflect qw/:cases/;

Or only subs and genders

    use Lingua::RU::Inflect qw/:subs :genders/;

Or everything: subs, aliases, genders and case names:

    use Lingua::RU::Inflect qw/:all/; # or
    use Lingua::RU::Inflect qw/:cases :genders :subs/;



Try to detect gender by name. Up to three arguments expected: lastname, firstname, patronym.

Return MASCULINE, FEMININE for successful detection or undef when function can't detect gender.

Detection rules

When name match some rule, rest of rules are ignored.

  1. Patronym (russian отчество — otchestvo), if presented, gives unambiguous detection rules: feminine patronyms ends with “na”, masculine ones ends with “ich” and “ych”.

  2. Most of russian feminine firstnames ends to vowels “a” and “ya”. Most of russian masculine firstnames ends to consonants.

    There's exists exceptions for both rules: feminine names such as russian name Lubov' (Любовь) and foreign names Ruf' (Руфь), Rachil' (Рахиль) etc. Masculine names also often have affectionate diminutive forms: Alyosha (Алёша) for Alexey (Алексей), Kolya (Коля) for Nickolay (Николай) etc. Some affectionate diminutive names are ambiguous: Sasha (Саша) is diminutive name for feminine name Alexandra (Александра) and for masculine name Alexander (Александр), Zhenya (Женя) is diminutive name for feminine name Eugenia (Евгения) and for masculine name Eugene (Евгений) etc.

    These exceptions are processed.

    When got ambiguous result, function try to use next rule.

  3. Most of russian lastnames derived from possessive nouns (and names). Feminine forms of these lastnames ends to “a”. Some lastnames derived from adjectives. Feminine forms of these lastnames ends to “ya”.


Inflects name of given gender to given case. Up to 5 arguments expected: gender, case, lastname, firstname, patronym. Lastname, firstname, patronym must be in Nominative.

Returns list which contains inflected lastname, firstname, patronym.


Detects gender by given name and inflect parts of this name.

Expects for up to 4 arguments: case, lastname, firstname, patronym


It returns list which contains inflected lastname, firstname, patronym


Alexander Sapozhnikov, <shoorick at>


Please report any bugs or feature requests to bug-lingua-ru-inflect at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


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

    perldoc Lingua::RU::Inflect

You can also look for information at:


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

ACKNOWLEDGEMENTS and (in Russian) for rules of declension. for directory of names.


Copyright 2009-2018 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 for more information.