Treex::PML::FSFormat - Treex::PML class representing the file header of a FS file.
NOTE: Don't call this constructor directly, use Treex::PML::Factory->createFSFormat() instead!
Create a new FS format instance object by parsing a given input as a FS file header. If the argument is an ARRAY reference, each element is assumed to represent a single line.
Create a new FS format instance object and initialize it with the optional values.
Same as Treex::PML::FSFormat->new (\@header).
Duplicate FS format instance object.
Initialize a new FS format instance with given values. See Treex::PML for more information about attribute hash, ordered names list and unparsed headers.
Adds a new attribute definition to the Treex::PML::FSFormat. Type must be one of the letters [KPOVNWLH], colour one of characters [A-Z0-9]. If the type is L, the fourth parameter is a string containing a list of possible values separated by |.
Reads FS format instance definition from given source, optionally echoing the unparsed input on the given output. The obligatory argument source must be either a GLOB or list reference. Argument output is optional and if given, it must be a GLOB reference.
Return FS declaration as an array of FS header declarations.
Write FS declaration to a given file (file handle open for reading must be passed as a GLOB reference).
Return names of special attributes declared in FS format as @W, @N, @V, @H respectively.
Return the lowest ancestor-or-self of the given node whose value of the FS attribute declared as @H is either 'hide' or 1. Return undef, if no such node exists.
Return a reference to the internally stored attribute hash.
Return a reference to the internally stored attribute names list.
Return a reference to the internally stored unparsed FS header. Note, that this header must not correspond to the defs and attributes if any changes are made to the definitions or names at run-time by hand.
Refresh special attribute hash.
Return a reference to a hash of attributes of special types. Keys of the hash are special attribute types and values are their names.
Return a list of all attribute names (in the order given by FS instance declaration).
Return the n'th attribute name (in the order given by FS instance declaration).
Return the definition string for the given attribute.
Return the number of declared attributes.
Return true if given attribute is assigned a list of all possible values.
Return the list of all possible values for the given attribute.
Return one of Shadow, Hilite and XHilite depending on the color assigned to the given attribute in the FS format instance.
Return name of a special attribute declared in FS definition with a given letter. See also sentord() and similar.
Return index of the given attribute (in the order given by FS instance declaration).
Return true if an attribute of the given name exists.
Return a string containing the content of value (special) attributes of the nodes of the given tree, separated by separator string, sorted by value of the (special) attribute sentord or (if sentord does not exist) by (special) attribute order.
Create a copy of the given node.
Create a deep copy of the given subtree.
Treex::PML, Treex::PML::Factory, Treex::PML::Document, Treex::PML::Schema
Copyright (C) 2006-2010 by Petr Pajas
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.
To install Treex::PML, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.