Parent Directory | Revision Log | Patch
revision 7 by dpavlin, Sat Feb 26 18:13:14 2005 UTC | revision 8 by dpavlin, Sat Feb 26 18:23:56 2005 UTC | |
---|---|---|
# | Line 50 my $stems = 0; | Line 50 my $stems = 0; |
50 | ||
51 | ||
52 | my $last_stem = ''; | my $last_stem = ''; |
53 | my $errors = 0; | |
54 | sub check_stem { | sub check_stem { |
55 | my $s = shift || return; | my $s = shift || return; |
56 | if ($last_stem) { | if ($last_stem) { |
57 | print "ERROR==> " if ($last_stem ne $s); | if ($last_stem ne $s) { |
58 | print "ERROR==> "; | |
59 | $errors++; | |
60 | } | |
61 | } else { | } else { |
62 | $last_stem = $s; | $last_stem = $s; |
63 | } | } |
# | Line 127 while(<>) { | Line 131 while(<>) { |
131 | ||
132 | } | } |
133 | my $nr_stems = keys(%stem_words); | my $nr_stems = keys(%stem_words); |
134 | printf "\n# %d words, %d stems in %d ops, %.2f%% size\n",$words,$nr_stems,$stems,($nr_stems*100/$words); | printf "\n# %d words, %d stems in %d ops, %.2f%% size [%d errors]\n",$words,$nr_stems,$stems,($nr_stems*100/$words),$errors; |
135 | ||
136 | foreach my $s (keys %stem_words) { | foreach my $s (keys %stem_words) { |
137 | print "#stem $stem_words{$s} $s\n"; | print "#stem $stem_words{$s} $s\n"; |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |