Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/regru/lingua-ru-num2word
https://github.com/regru/lingua-ru-num2word
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/regru/lingua-ru-num2word
- Owner: regru
- Created: 2015-02-10T13:31:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-05T15:43:17.000Z (over 9 years ago)
- Last Synced: 2024-04-17T05:50:32.727Z (9 months ago)
- Language: Perl
- Size: 261 KB
- Stars: 2
- Watchers: 28
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Lingua::RU::Num2Word - Numbers to words in russian (without currency, but with specified gender)
[![Build Status](https://travis-ci.org/regru/lingua-ru-num2word.svg?branch=master)](https://travis-ci.org/regru/lingua-ru-num2word)
# VERSION
version 0.04
# SYNOPSIS
use Lingua::RU::Num2Word qw/num2rus_cardinal/;
print num2rus_cardinal(21, 'NEUTER'); # двадцать одно## num2rus\_cardinal( $number, $gender )
Translates number to text converter for russian, using the specified gender. Returns Unicode string.
Main code was taken from [Lingua::RUS::Number](https://metacpan.org/pod/Lingua::RUS::Number).$gender
Can be
FEMININE
MASCULINE
NEUTERuse Lingua::RU::Num2Word qw/num2rus_cardinal/;
my $text = num2rus_cardinal(561); # outputs пятьсот шестьдесят одинmy $bottles_on_wall = 22;
print num2rus_cardinal($bottles_on_wall, 'FEMININE') . " бутылки пива на стене"; # outputs "двадцать две бутылки пива на стене"
$bottles_on_wall --;
print num2rus_cardinal($bottles_on_wall, 'FEMININE') . " бутылка пива на стене"; # outputs "двадцать одна бутылка пива на стене"# ORIGINAL MODULE [Lingua::RUS::Number](https://metacpan.org/pod/Lingua::RUS::Number)
fork coding, maintenance, refactoring, extensions: Richard C. Jelinek
initial coding: Vladislav A. Safronov, EFE, EFE# AUTHOR
Polina Shubina <[email protected]>
# COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by REG.RU LLC.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.