DeSR Dependency Parser

Parser::TokenPath Struct Reference

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.

Definition at line 37 of file TokenPath.h.


Member Function Documentation

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

Extend the path with a new leg d.

Definition at line 57 of file TokenPath.h.

References code, and path.

char const * Parser::TokenPath::Code (  )  const

Returns:
the string code of the path

Definition at line 53 of file TokenPath.cpp.

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"
  }

Definition at line 49 of file TokenPath.h.


The documentation for this struct was generated from the following files:
 
Copyright © 2005-2007 G. Attardi. Generated on 13 Aug 2009 by doxygen 1.5.7.1.