| 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
| |||||||||||
| 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. | ||||||||||