/usr/share/doc/libbiblio-thesaurus-perl/examples/thesaurusV is in libbiblio-thesaurus-perl 0.43-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #!/usr/bin/perl -w -s
our ($ori,$ablt,$rblt) ;
my ($bl);
$bl = $ablt if (defined $ablt) && ($ablt =~ /[A-Za-z]+/);
$bl = $rblt if (defined $rblt) && ($rblt =~ /[A-Za-z]+/);
$/='';
my $s;
while(<>){
chomp;
if (/^\%baselang(?:uage)?\s+(\S+)/) { $bl ||= $1;
while(m{\%(\S+)}g){ $direct{$1}++} }
elsif(/^\%(\S+)/) {
while(m{\%(\S+)}g){ $direct{$1}++} }
elsif(/^#/) { }
elsif(/^(\S.*)/) {
my $t = $1;
my $r = $';
while( m{\n(\S+)(?:[ \t]+)((?:.|\n[ \t])*)}g ){
my $def=$2;
$rel{$1}++;
print "Error: $1($t) is empty\n" unless $def =~ /\w/;
}}
else { print "Error: {$_}\n"}
}
for (sort keys %direct){ print "\%$_\t= $direct{$_}\n"; }
for (sort keys %rel){ print "$_\t= $rel{$_}\n"; }
__END__
=head1 NAME
thesaurusV - Make thesaurus statistics
=head1 SYNOPSIS
thesaurusV file.the
=head1 DESCRIPTION
Calculates some statistics and simple validations
Useful for debugging thesaurus...
=head1 AUTHOR
J.Joao Almeida, jj@di.uminho.pt
=head1 SEE ALSO
perl(1).
=cut
|