
use warnings;
use strict;

use Lingua::PT::NamedEntity;

use Data::Dumper;

sub perEntity {
    my $b = $_[1] ? " (begin)" : "";
    print "ENTIDADE$b: '$_[0]'\n";
}

sub perText {
    print "TEXT: '$_[0]'\n"
}

sub perChunk {
    my %c = @_;
    print Dumper(\%c);
}


my $ne = Lingua::PT::NamedEntity::new();
while (<>) {
    $ne->process(text => $_, perEntity => \&perEntity);
}
