Skip to content

Instantly share code, notes, and snippets.

@jadeallenx
Created August 1, 2018 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadeallenx/eea475f2e1c6d67f82c667d17c8ccdd0 to your computer and use it in GitHub Desktop.
Save jadeallenx/eea475f2e1c6d67f82c667d17c8ccdd0 to your computer and use it in GitHub Desktop.
Russian personal pronouns
#!/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