use strict; use warnings; use Lingua::EN::Tagger qw(add_tags); my %tags; my $postagger = new Lingua::EN::Tagger; my $text = "the quick brown fox jumped over the lazy dog"; my $tagged = $postagger->add_tags($text); print $tagged, "\n\n"; $tags{ uc $1 }++ while $tagged =~ m!<([^/]+?)>!g; print "$_: $tags{$_}\n" for sort keys %tags;