#!/usr/local/bin/perl
use ddmf;
use jspell;

mtff::init(shift);
my $p = shift;

$a = { 
  idiom     => sub{ my $x=shift; +{mtff::consulta($x)}} ,
  proverbio => sub{ my $x=shift; 
     +{map {tup2ff($_,":",qw{name isa origem solucao}) } nlgrep1($x,$p)}}
#     [map {tup2ffr($_,":",qw{name isa origem solucao}) } nlgrep1($x,$p)]}
};

print "> ";

while(<>){ 
  chomp;
  print any2str( comparsetff($_,$a));
#  print any2str( +{mtff::consulta($_)});
  
  print "\n> ";
}
