Block/W2A/EN/Lemmatize.pm

filter: Statementstmt 73.0% 19 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 1 / 1 totaltotal 73.5% 25 / 34 CC 1 SCAR 2.5
CC
1
Cov
73%
process_anode
2.0
_build_lemmatizer
2.0
BEGIN
1.0
CRAP 1.3
« Tool/EnglishMorpho/exceptions/verbs_not_ending_with_e.pl ↑ Summary Block/W2A/EN/ParseMSTperl.pm »
1 package Treex::Block::W2A::EN::Lemmatize;
2 1 $Treex::Block::W2A::EN::Lemmatize::VERSION = '2.20151102';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Treex::Core::Common;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 extends 'Treex::Core::Block';
8  
9 1 ▶use Treex::Tool::EnglishMorpho::Lemmatizer;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 has 'lemmatizer' => (
12 is => 'ro',
13 isa => 'Treex::Tool::EnglishMorpho::Lemmatizer',
14 builder => '_build_lemmatizer',
15 init_arg => undef,
16 lazy => 1,
17 );
18  
19 0 ▶sub process_anode {
Subroutine process_anode: not called CC=1 SCAR=6.9
Pod documented
20 0 my ( $self, $anode ) = @_;
21 0 my ( $lemma ) = $self->lemmatizer->lemmatize( $anode->form, $anode->tag ); #gracefully throwing away second field of returned list
22 0 $anode->set_lemma($lemma);
23  
24 0 return 1;
25 }
26  
27 0 ▶sub _build_lemmatizer {
Subroutine _build_lemmatizer: not called CC=1 SCAR=6.9
28 0 my $self = shift;
29 0 my $lemmatizer = Treex::Tool::EnglishMorpho::Lemmatizer->new();
30 0 return $lemmatizer;
31 }
32  
33 1 1;
34  
35 __END__
« Tool/EnglishMorpho/exceptions/verbs_not_ending_with_e.pl ↑ Summary Block/W2A/EN/ParseMSTperl.pm »