| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/local/bin/perl -w
use warnings;
use strict;
use Getopt::Long;
use Pod::Usage;
my $man = 0;
my $help = 0;
## Parse options and print usage if there is a syntax error,
## or if usage was explicitly requested.
GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-verbose => 2) if $man;
## If no arguments were given, then allow STDIN to be used only
## if it's not connected to a terminal (otherwise print usage)
pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
use Lingua::Treebank;
FILE:
while (<>) {
chomp;
my $side = Lingua::Treebank::Const->new()->from_penn_string($_);
print $side->as_penn_text(), "\n";
}
__END__
=head1 NAME
tree-inflate - transform a one-tree-per-line treebank into something
human-readable
=head1 SYNOPSIS
tree-inflate [options] [file or STDIN]
Options:
-help brief help message
-man full documentation
=head1 OPTIONS
=over
=item B<-help>
Print a brief help message and exits.
=item B<-man>
Prints the manual page and exits.
=back
=head1 DESCRIPTION
Reads one-tree-per-line from STDIN or indicated files, reformats the
trees according to a Penn standard (spreading daughters to the next
line, applying indenting, etc) and prints them to STDOUT.
Handy with I<less> etc for spot-checking trees stored in one-per-line
format.
=cut