=pod

=head1 PML

PML.mak - Miscelaneous macros of general use in Prague Dependency
Treebank (PDT) 2.0

=head2 USAGE

  #include <contrib/pml/PML.mak>

=head2 MACROS

The following macros (functions) are provided by this package:

=over 4

=item PML::SchemaName()

Return name of the root element of a PML instance as specified in the
PML schema associated with the current file. PDT uses root element
named C<adata> for analytical layer annotation and C<tdata> for
tectogrammatical layer annotation.

=item PML::SchemaDescription()

Return the content of the element C<description> of the PML schema
associated with the current file.

=item PML::Schema($object?)

For a Treex::PML::Node object returns PML schema associated with that object.
If the object is a Treex::PML::Document, return PML schema associated with the given
file. If no object is given, the current Treex::PML::Document is used.

The PML schema is returned in form of a Treex::PML::Schema object.

=item PML::GetNodeByID($id_or_ref,$fsfile?)

Looks up a node from the current file (or given fsfile) by its ID (or
PMLREF - i.e. the ID preceded by a file prefix of the form C<xy#>).

=item PML::DeleteFromNodeHash($id,$fsfile?)

Deletes a given ID from a node HASH of the current or specified Treex::PML::Document
The node previously hashed under the given ID is returned.

=item PML::AddToNodeHash($id,$node,$fsfile?)

Adds a node to the node hash (of the given or current Treex::PML::Document) using
given ID as the hash key.

=item PML::SearchForNodeById($id)

Searches for node with given id. Returns the node and the number of
the tree.

=item PML::GetNodeHash($fsfile?)

Return a reference to a hash indexing nodes in a given file (or the
current file if no argument is given). If such a hash was not yet
created, it is built upon the first call to this function (or other
functions calling it, such as C<GetNodeByID>. Use C<clearNodeHash> to
clear the hash.

=item PML::ClearNodesHash($fsfile?)

Clear the internal hash indexing nodes of a given file (or the current
file if called without an argument).

=item PML::GotoTree()

Ask user for sentence or node identificator (tree number or id) and go to the
sentence.

=item PML::NonProjEdges($node,$ord?,$filterNode?,$returnParents?,$subord?,$filterGap?)

DEPRECATED, use non_proj_edges from <contrib/support/non_projectivity.mak> instead.

=back

