#!/import/perl/bin/perl
# keywords2counts.pl ascii/dt.toc > keywords.counts

while (<>) {
    chop;
    ($songid, $songnum, $line, $start, $end, $tunecodes, $title, $cats) = split(/;/);
    $songid =~ tr/ //d;
    $Songs{$songid} = $title;
    $tunecodes =~ s/^%//;
    $tunecodes =~ tr/ //d;
    foreach $key (split(/@/,$cats)) {
	$lower = $key;
	$lower =~ tr/A-Z/a-z/;
	$cap{$lower} = $key;
	$keycounts{$lower}++ if $key;
    }
}


foreach $lower (sort keys %keycounts) {
    $key = $cap{$lower};
    printf "%4d  %s\n", $keycounts{$lower}, $key;
}
