Treex::Core::BundleZone - contains a sentence and its linguistic representations
version 2.20210102
use Treex::Core; my $doc = Treex::Core->new; my $bundle = $doc->create_bundle(); my $zone = $bundle->create_zone('en','reference'); $zone->set_sentence('John loves Mary.');
Document zones allow Treex documents to contain more texts, typically parallel texts (translations), or corresponding texts from different sources (text to be translated, reference translation, test translation).
Treex::Core::BundleZone instances have the following attributes:
Treex::Core::BundleZone
The attributes can be accessed using semi-affordance accessors: getters have the same names as attributes, while setters start with set_. For example, the attribute sentence has a getter sentence() and a setter set_sentence($sentence)
set_
sentence
sentence()
set_sentence($sentence)
Treex::Core::BundleZone instances should not be created by the constructor, but should be created exclusively by calling one of the following methods of the embedding Treex::Core::Bundle instance:
There are four types of linguistic trees distinguished in Treex, each of them represented by one letter: a - analytical treex, t - tectogrammatical trees, p - phrase-structure trees, n - named entity trees. You can create trees by following methods:
You can access trees by
Presence of a tree of a certain type can be detected by
You can remove trees by
returns the Treex::Core::Bundle instance which the zone belongs to
returns the Treex::Core::Document instance which the zone belongs to
creates a copy of the zone (currently copies only the a-tree) under the same language and a new selector
Zdeněk Žabokrtský <zabokrtsky@ufal.mff.cuni.cz>
Martin Popel <popel@ufal.mff.cuni.cz>
Copyright © 2011 by Institute of Formal and Applied Linguistics, Charles University in Prague
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Treex::Core, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Core
CPAN shell
perl -MCPAN -e shell install Treex::Core
For more information on module installation, please visit the detailed CPAN module installation guide.