#!/usr/bin/perl -s my $id="__jj1-constituicao"; our ($lang); my @l = (); my @inv =(direction => "<~"); if ($lang eq "ES") {@l = (direction => "<~"); @inv = () } use NAT::Client; use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Terse=1; my $client = NAT::Client->new( Local => "./$id"); while(<>){ chomp; my %r = (); my $a1 = $client->ptd( { @l }, $_); my $word = $_; for ((sort {$b->[2]<=>$a->[2]} @{$client->ngrams("$word *")})[0..9]){ next unless $_; printf("%13s |", "$_->[2] $_->[1]"); for ((sort {$b->[3]<=>$a->[3]} @{$client->ngrams("$word $_->[1] *")})[0..9]){ next unless $_; print ("| $_->[2] "); } print "\n"; } } __END__ =head1 NAME jj-6 - ... =head1 SYNOPSIS =head1 DESCRIPTION (Previously: jj-1 -> to create the corpus) ... =head1 AUTHOR J.Joao Almeida, jj@di.uminho.pt =head1 SEE ALSO perl(1). =cut