Created
August 1, 2018 05:35
-
-
Save jadeallenx/eea475f2e1c6d67f82c667d17c8ccdd0 to your computer and use it in GitHub Desktop.
Russian personal pronouns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.014; | |
use utf8; | |
use Text::CSV qw(csv); | |
use List::Util qw(shuffle pairs); | |
use List::MoreUtils qw(zip); | |
my $pn = { | |
я => [qw(меня мне меня мной мне)], | |
мы => [qw(нас нам нас нами нас)], | |
ты => [qw(тебя тебе тебя тобой тебе)], | |
вы => [qw(вас вам вас вами вас)], | |
он => [qw(его ему его им нём)], | |
оно => [qw(его ему его им нём)], | |
она => [qw(её ей её ей ней)], | |
они => [qw(их им их ими них)] | |
}; | |
my @cases = qw(gen dat acc inst prep); | |
my @out; | |
for my $nom ( keys %{ $pn } ) { | |
for my $p ( pairs (zip @cases, @{ $pn->{$nom} }) ) { | |
my ($c, $w) = @{ $p }; | |
push @out, [ qq|$nom ($c)|, qq|$w| ]; | |
} | |
} | |
my @rout = shuffle @out; | |
csv(in => \@rout, encoding => "UTF-8", out => "pp.csv"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment