cleanup; add lineno so number of letters is apparent

This commit is contained in:
ehouse 2008-02-20 03:44:31 +00:00
parent e6a485f653
commit ab73fc4d38
2 changed files with 6 additions and 4 deletions

View file

@ -239,10 +239,10 @@ endif
dawg$(XWLANG)%.stamp: $(XWLANG)Main.dict.gz $(DICT2DAWG) table.bin ../Makefile.langcommon
start=$$(echo $@ | sed -e 's/dawg$(XWLANG)\([0-9]*\)to[0-9]*.stamp/\1/'); \
end=$$(echo $@ | sed -e 's/dawg$(XWLANG)[0-9]*to\([0-9]*\).stamp/\1/'); \
echo $${start} and $$end; \
echo $${start} and $${end}; \
zcat $< | $(DICT2DAWG) $(DICT2DAWGARGS) $(TABLE_ARG) table.bin -b 28000 \
-ob dawg$(XWLANG)$* \
-sn $(XWLANG)StartLoc.bin -min $$start -max $$end \
-sn $(XWLANG)StartLoc.bin -min $${start} -max $${end} \
-wc $(XWLANG)$*_wordcount.bin $(FORCE_4) -ns $(XWLANG)$*_nodesize.bin
touch $@

View file

@ -53,12 +53,14 @@ for ( my $i = 1 ; $i <= 99; ++$i ) {
print "\n\n**** Letter counts ****\n";
print "ASCII ORD HEX PCT (of $letterCount)\n";
my $lineNo = 1;
for ( my $i = 0; $i < 255; ++$i ) {
my $count = $letterCounts[$i];
if ( $count > 0 ) {
my $pct = (100.00 * $count) / $letterCount;
printf( "%3s %3d %x %5.2f (%d)\n",
chr($i), $i, $i, $pct, $count );
printf( "%2d: %3s %3d %x %5.2f (%d)\n",
$lineNo, chr($i), $i, $i, $pct, $count );
++$lineNo;
}
}