in reply to Re^3: Installing Lingua BrillTagger
in thread Installing Lingua BrillTagger
Thanks. So using Lingua::EN::Tagger code below I can get the output of a file all tagged. But I still can't work out how just to display the tags.
Looking at the .pm file I cannot see an obvious way for it to output, say, <NN> : 2, <CC> : 5 and so on. I can only see subs to add_tag to text, not just to display them.
#!/usr/bin/env perl use Lingua::EN::Tagger qw(add_tags); my $postagger = new Lingua::EN::Tagger; my $file = "test.txt"; my $text = do { local $/ = undef; open my $fh, "<", $file or die "could not open $file: $!"; <$fh>; }; my $tagged = $postagger->add_tags($text); print $tagged, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Installing Lingua BrillTagger ( sub Lingua::EN::Tagger::get_tag_counts )
by Anonymous Monk on Jan 21, 2014 at 02:37 UTC | |
by Mordan (Initiate) on Jan 21, 2014 at 16:38 UTC |