lib/Treex/Core/TredView/AnnotationCommand.pm

filter: Statementstmt 50.0% 6 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod 100% 1 / 1 totaltotal 47.0% 8 / 17 CC 2 SCAR 14.7
CC
2
Cov
43%
run
6.0
BEGIN
1.0
CRAP 4.3
« lib/Treex/Core/Zone.pm ↑ Summary lib/Treex/Core/BundleZone.pm »
1 package Treex::Core::TredView::AnnotationCommand;
2 {
3 2 $Treex::Core::TredView::AnnotationCommand::VERSION = '0.08633_1';
4 }
5  
6 2 ▶use Treex::Core::Log;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub run {
9 0 ▶ my ( $command, $node ) = @_;
Subroutine run: not called CC=2 SCAR=17.9
Pod documented
10  
11 0 my ( $short_command, $argument ) = split / /, $command;
12  
13 0 print "in AnnotationCommand1\n";
14  
15 0 ▶ if ( $short_command eq 'd' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($short_command eq "d") 0 0 0
16 0 print "in AnnotationCommand2\n";
17 0 $node->set_conll_deprel($argument);
18 }
19 }
20  
21 2 1;
22  
23 __END__
24  
25 =head1 NAME
26  
27 Treex::Core::TredView::AnnotationCommand - simple command-line annotation interface
28  
29 =head1 VERSION
30  
31 version 0.08633_1
32  
33 =head1 DESCRIPTION
34  
35 This module allows to annotate Treex files in TrEd by means
36 of a simple text-based command language. Command line dialog
37 is invoked in the Treex entension after pressing space.
38  
39 The command language will be specified in the future.
40 At this moment, the language supports only one command:
41 'd <deprel>', which fills the <deprel> value into the conll/deprel
42 attribute.
43  
44 =head1 METHODS
45  
46 =head2 Public methods
47  
48 =over 4
49  
50 =item run($command,$node)
51  
52 =back
53  
54 =head1 AUTHOR
55  
56 Zdeněk Žabokrtský <toman@ufal.mff.cuni.cz>
57  
58 =head1 COPYRIGHT AND LICENSE
59  
60 Copyright © 2012 by Institute of Formal and Applied Linguistics, Charles University in Prague
61  
62 This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
« lib/Treex/Core/Zone.pm ↑ Summary lib/Treex/Core/BundleZone.pm »