#!/usr/bin/perl use ddmf; use jspell; jspell_dict("port"); $d1 = mkddmf( sub{my $a=shift; nlgrep({max => 50} ,$a,"/home/jj/public_html/pln/proverbio.dic") }, {id => "prov"}); $d2 = mkddmf( sub{my $a=shift; nlgrep({max => 10} ,$a,"/home/jj/public_html/pln/corpora/NaturaVilela")}, {id => "exemplos"}); $rr=[ [ sub{my $ff=shift; ($ff->{FSEM} eq "mento") }, sub{my $ef= shift; delete($ef->{FSEM}); $ef->{semantic}= "The action of '$ef->{rad}'"; if($ef->{T} ne "i"){#not intransitive $ef->{grammar}= "It accepts the preposition phrase 'de' with the direct attribute"; } $ef} ], rren("G","gender"), rren("rad","radical"), rren("N","number"), subs("s","singular"), subs("m","masculine"), subs("nc","common name"), ]; $d3 = mkddmfrr($rr,sub{ fea(shift) },{id=> "morf"}) ; $d4 = mkmtff("/home/jj/calao/calao",{lang => "pt", id=> "calao"}); #$d6 = mktagcompar([$d4,$d1,$d3,$d2]); $d6 = mkcomser([$d4,$d1,$d3,$d2]); ##$d6 = mkcomparsetff([$d4,$d1,$d2]); interpret($d6);