PML_mak documentation

Table of contents


PML

ToC

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

USAGE

  #include <contrib/pml/PML.mak>

MACROS

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

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 adata for analytical layer annotation and tdata for tectogrammatical layer annotation.

PML::SchemaDescription()

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

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.

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 xy#).

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.

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.

PML::SearchForNodeById($id)

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

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 GetNodeByID. Use clearNodeHash to clear the hash.

PML::ClearNodesHash($fsfile?)

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

PML::GotoTree()

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

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

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