16 open IN, "variant.txt";
17 open OYES , ">variant-yes.lst";
18 open OMAYBE, ">variant-maybe.lst";
19 open BYES , ">nonamer-yes.lst";
20 open BMAYBE, ">nonamer-maybe.lst";
23 ($w, $f, $s) = /^(.+):?\t(.)([!?]?)$/ or die "Bad Line: $_";
24 next unless $w =~ /^[A-Za-z\']+$/;
25 #print "$w -- $f -- $s\n";
26 $already_variant{$w} = 1;
27 if ($s eq '!' || $s eq '') {
28 print OYES $w, "\n" if $f eq '#';
29 print BYES $w, "\n" if $f eq '&';
31 print OMAYBE $w, "\n" if $f eq '#';
32 print BMAYBE $w, "\n" if $f eq '&';
42 open IN, "2of12full.txt";
43 open O02, ">02of12.lst";
44 open O05, ">05of12.lst";
45 open O11, ">11of12.lst";
46 open U, ">4of12upper.lst";
47 open ONA, ">not-abbr.lst";
48 open V, ">variant-also.lst";
49 open NV, ">not-variant.lst";
54 ($total, $not_variant, $variant, $non_american, $word, $abrv_mark)
55 = /^(..): (..) (..)\# (..)\& (.+?)([:.]?)$/ or die "Bad Line:$_";
57 $not_variant = 0 if $not_variant eq ' -';
58 $variant = 0 if $variant eq ' -';
59 $non_american = 0 if $non_american eq ' -';
60 next unless /^[A-Za-z\']+$/;
62 my $not_abrv = ($abrv_mark eq '' && $total >= 5);
63 my $is_variant = ($variant >= $non_american
64 && ($variant + $non_american) > $not_variant
65 && !$already_variant{$word});
66 print ONA if $not_abrv;
67 print V if $is_variant;
68 print NV unless $is_variant || $already_variant{$word};
71 } elsif ($total >= 5) {
73 } elsif ($total >= 4 && /^[A-Z]+/ && $abrv_mark eq '') {
75 } elsif ($total >= 2) {
78 die "This should not happen: $total $_\n";