Tanl Linguistic Pipeline

Parser::TokenPath Struct Reference
[Dependency Parser]

Specification of a path from a token, through the sentence. More...

#include <TokenPath.h>

List of all members.

Public Types

enum  Direction {
  leftChild, rightChild, parent, leftSibling,
  rightSibling, previous, next
}

Public Member Functions

 TokenPath (int root)
void add (Direction d)
 Extend the path with a new leg d.
char const * Code () const
std::ostream & serialize (std::ostream &os) const

Static Public Member Functions

static int get (std::string &tok)

Public Attributes

std::vector< Direction > path
 path to the token
int root
 the start token position
std::string code
 code string

Static Public Attributes

static char const * Names []
static char const *const dirCode = "/\\^<>-+"

Detailed Description

Specification of a path from a token, through the sentence.


Member Function Documentation

void Parser::TokenPath::add ( Direction  d  )  [inline]

Extend the path with a new leg d.

References code, and path.

char const * Parser::TokenPath::Code (  )  const
Returns:
the string code of the path

References code.

std::ostream& Parser::TokenPath::serialize ( std::ostream &  os  )  const
Returns:
a human readble representation of the path

Member Data Documentation

char const * Parser::TokenPath::Names [static]
Initial value:
 {
    "leftChild",
    "rightChild",
    "parent",
    "leftSibling",
    "rightSibling",
    "prev",
    "next"
  }

The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.