new-words
diff misc/categorized.pl @ 58:12abeed4d89f
added notes2anki.pl experimental script
author | Igor Chubin <igor@chub.in> |
---|---|
date | Thu Nov 03 16:08:46 2011 +0100 (2011-11-03) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/misc/categorized.pl Thu Nov 03 16:08:46 2011 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +my @n_m=(); 1.5 +my @n_n=(); 1.6 +my @n_f=(); 1.7 +my @adv=(); 1.8 +my @modadv=(); 1.9 +my @adj=(); 1.10 +my @sub=(); 1.11 +my @verb=(); 1.12 +my @cj=(); 1.13 +my @pron=(); 1.14 +my @prp=(); 1.15 +my @rest=(); 1.16 + 1.17 +while(<>) { 1.18 + if (/adj/) { push @adj, $_; } 1.19 + elsif (/sub/) { push @sub, $_; } 1.20 + elsif (/[| ]v[it][: ]/) { push @verb, $_; } 1.21 + elsif (/\(sich\)/) { push @sich, $_; } 1.22 + elsif (/[| ]m[- :]/) { push @n_m, $_; } 1.23 + elsif (/[| ]n[- :]/) { push @n_n, $_; } 1.24 + elsif (/[| ]f[- :]/) { push @n_f, $_; } 1.25 + elsif (/mod adv/) { push @modadv, $_; } 1.26 + elsif (/adv/) { push @adv, $_; } 1.27 + elsif (/prp[: ]/) { push @prp, $_; } 1.28 + elsif (/cj[: ]/) { push @cj, $_; } 1.29 + elsif (/pron[: ]/) { push @pron, $_; } 1.30 + else { push @rest, $_; } 1.31 +} 1.32 + 1.33 +print "== Существительные ==\n"; 1.34 +print "=== Мужской род ===\n"; 1.35 +print sort(@n_m); 1.36 +print "\n=== Средний род ===\n"; 1.37 +print sort(@n_n); 1.38 +print "\n=== Женский род ===\n"; 1.39 +print sort(@n_f); 1.40 +print "\n\n\n== Глаголы ===\n"; 1.41 +print sort(@verb); 1.42 +print "\n\n\n== Прилагательные ==\n"; 1.43 +print sort(@adj); 1.44 +print "\n\n=== Субстантивированные прилагательные и причастия ===\n"; 1.45 +print sort(@sub); 1.46 +print "\n\n\n== Местоимения ==\n"; 1.47 +print sort(@pron); 1.48 +print "\n\n\n== Наречия ==\n"; 1.49 +print sort(@adv); 1.50 +print "\n\n=== Модальные наречия ===\n"; 1.51 +print sort(@modadv); 1.52 +print "\n\n\n== Предлоги ==\n"; 1.53 +print sort(@prp); 1.54 +print "\n\n\n== Союзы ==\n"; 1.55 +print sort(@cj); 1.56 +print "\n\n\n== Прочее ==\n"; 1.57 +print sort(@rest); 1.58 +