use ddmf; use jspell; jspell_dict("port"); $d1 = mkddmf( sub{my $a=shift; [nlgrep({max=>200},$a,"/home/jj/public_html/pln/proverbio.dic")] }, {id=> "d1"} ); $d2 = mkmttab("/home/jj/DICIONARIOS/pt-en-sp.Linguafone/pt-en-sp", {sep => ":", lang=> "pt", id=> "d2", type => "list"}, "Portuguese","English","Spanish"); $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=>"d3"}) ; $d4 = mkdbddmf("/home/jj/cvs/dpl/example/calao.dic",{id=>"d4", lang => "pt"} ); #$d6 = mktagcompar([ $d1,$d3 ]); $d6 = mktagcompar([ $d4, $d1, $d2, $d3 ], {id => "4d"}); interpret($d6);