annotate misc/categorized.pl @ 49:00286f6bfa85
experimental: when -c specified, use dictionary for compression
author |
Igor Chubin <igor@chub.in> |
date |
Wed Feb 09 21:08:23 2011 +0200 (2011-02-09) |
parents |
|
children |
|
rev |
line source |
igor@46
|
1 my @n_m=();
|
igor@46
|
2 my @n_n=();
|
igor@46
|
3 my @n_f=();
|
igor@46
|
4 my @adv=();
|
igor@46
|
5 my @modadv=();
|
igor@46
|
6 my @adj=();
|
igor@46
|
7 my @sub=();
|
igor@46
|
8 my @verb=();
|
igor@46
|
9 my @cj=();
|
igor@46
|
10 my @pron=();
|
igor@46
|
11 my @prp=();
|
igor@46
|
12 my @rest=();
|
igor@46
|
13
|
igor@46
|
14 while(<>) {
|
igor@46
|
15 if (/adj/) { push @adj, $_; }
|
igor@46
|
16 elsif (/sub/) { push @sub, $_; }
|
igor@46
|
17 elsif (/[| ]v[it][: ]/) { push @verb, $_; }
|
igor@46
|
18 elsif (/\(sich\)/) { push @sich, $_; }
|
igor@46
|
19 elsif (/[| ]m[- :]/) { push @n_m, $_; }
|
igor@46
|
20 elsif (/[| ]n[- :]/) { push @n_n, $_; }
|
igor@46
|
21 elsif (/[| ]f[- :]/) { push @n_f, $_; }
|
igor@46
|
22 elsif (/mod adv/) { push @modadv, $_; }
|
igor@46
|
23 elsif (/adv/) { push @adv, $_; }
|
igor@46
|
24 elsif (/prp[: ]/) { push @prp, $_; }
|
igor@46
|
25 elsif (/cj[: ]/) { push @cj, $_; }
|
igor@46
|
26 elsif (/pron[: ]/) { push @pron, $_; }
|
igor@46
|
27 else { push @rest, $_; }
|
igor@46
|
28 }
|
igor@46
|
29
|
igor@46
|
30 print "== Существительные ==\n";
|
igor@46
|
31 print "=== Мужской род ===\n";
|
igor@46
|
32 print sort(@n_m);
|
igor@46
|
33 print "\n=== Средний род ===\n";
|
igor@46
|
34 print sort(@n_n);
|
igor@46
|
35 print "\n=== Женский род ===\n";
|
igor@46
|
36 print sort(@n_f);
|
igor@46
|
37 print "\n\n\n== Глаголы ===\n";
|
igor@46
|
38 print sort(@verb);
|
igor@46
|
39 print "\n\n\n== Прилагательные ==\n";
|
igor@46
|
40 print sort(@adj);
|
igor@46
|
41 print "\n\n=== Субстантивированные прилагательные и причастия ===\n";
|
igor@46
|
42 print sort(@sub);
|
igor@46
|
43 print "\n\n\n== Местоимения ==\n";
|
igor@46
|
44 print sort(@pron);
|
igor@46
|
45 print "\n\n\n== Наречия ==\n";
|
igor@46
|
46 print sort(@adv);
|
igor@46
|
47 print "\n\n=== Модальные наречия ===\n";
|
igor@46
|
48 print sort(@modadv);
|
igor@46
|
49 print "\n\n\n== Предлоги ==\n";
|
igor@46
|
50 print sort(@prp);
|
igor@46
|
51 print "\n\n\n== Союзы ==\n";
|
igor@46
|
52 print sort(@cj);
|
igor@46
|
53 print "\n\n\n== Прочее ==\n";
|
igor@46
|
54 print sort(@rest);
|
igor@46
|
55
|