Block/W2A/CS/ParseMSTperl.pm

filter: Statementstmt 72.7% 16 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 65.5% 19 / 29 CC 2 SCAR 11.0
CC
2
Cov
67%
get_coarse_grained_tag
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Tool/Lexicon/CS/Reflexivity.pm ↑ Summary Block/W2A/CS/Tokenize.pm »
1 package Treex::Block::W2A::CS::ParseMSTperl;
2 1 $Treex::Block::W2A::CS::ParseMSTperl::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 extends 'Treex::Block::W2A::ParseMSTperl';
7  
8 1 has 'model_name' => ( is => 'ro', isa => 'Str', default => 'pdt_form_small' ); #best: pdt_best
9 1 has 'model_dir' => ( is => 'ro', isa => 'Str', default => "data/models/parser/mst_perl/cs" );
10  
11 1 has 'alignment_language' => ( isa => 'Str', is => 'ro', default => 'en' );
12 1 has 'alignment_is_backwards' => ( isa => 'Bool', is => 'ro', default => '1' );
13  
14 0 ▶sub get_coarse_grained_tag {
Subroutine get_coarse_grained_tag: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my ( $self, $tag ) = @_;
16  
17 0 my $ctag;
18 0 ▶ if ( substr( $tag, 4, 1 ) eq '-' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($tag, 4, 1) eq '-') { } 0 0 0
19 # no case -> Pos + Subpos
20 0 $ctag = substr( $tag, 0, 2 );
21 } else {
22 # has case -> Pos + Case
23 0 $ctag = substr( $tag, 0, 1 ) . substr( $tag, 4, 1 );
24 }
25  
26 0 return $ctag;
27 }
28  
29 1 1;
30  
31 __END__
« Tool/Lexicon/CS/Reflexivity.pm ↑ Summary Block/W2A/CS/Tokenize.pm »