#!/usr/bin/perl

use Data::Dumper;
use ddmf;
use jspell;

jspell_dict("port");


$f={ FSEM=>"mento" ,
     T => "t",
     rad =>"alargar"};

$rr = [
   [ sub{my $ff=shift;
            $ff->{FSEM} eq "mento"},
     sub{my $ef= shift;
            delete($ef->{FSEM});
            $ef->{SEM} = "acto de $ef->{rad}";
            $ef}
   ],
    rren("rad","Radical"),
    rren("TR","Transitividade"),
    rren("CAT","Categoria"),
    rren("G","Género"),
    rren("N","número"),
];

#print Dumper ($f);
#print Dumper ($rr);
#print Dumper (rrs($rr,$f));

while(<>){
  chomp;
  print Dumper (rrss($rr,[fea($_)]));
}
