Skip Menu |

This queue is for tickets about the Lingua-Treebank CPAN distribution.

Report information
The Basics
Id: 15341
Status: resolved
Priority: 0/
Queue: Lingua-Treebank

People
Owner: kahn [...] cpan.org
Requestors: vassilii [...] tarunz.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.12
Fixed in: (no value)



Subject: [PATCH] suppress -NONE- terminals in Lingua::Treebank::Const::text
Dear Jeremy, Any terminal with a -NONE- tag has no backing in the dominated text, hence the tag. Therefore, they should be weeded out in the text() method. Please apply the attached patch to fix this. Also, I am unsure about the VERSION in the Const.pm --- isn't it supposed to be bumped in sync with the Lingua::Treebank::VERSION? Vassilii Khachaturov
--- /usr/share/perl5/Lingua/Treebank/Const.pm 2005-08-24 01:10:53.000000000 +0300 +++ Lingua/Treebank/Const.pm 2005-10-27 15:53:31.830542000 +0200 @@ -1225,7 +1225,10 @@ ################################################################## sub text { my __PACKAGE__ $self = shift; - return join(" ", map {$_->word()} $self->get_all_terminals()); + return join(" ", + map {$_->word()} + grep {$_->tag ne '-NONE-'} + $self->get_all_terminals()); } ################################################################## sub new {