DeSR Dependency Parser

Tanl::Attributes Struct Reference

Represents the attributes of a token. More...

#include <Token.h>

Collaboration diagram for Tanl::Attributes:

Collaboration graph

List of all members.

Classes

struct  const_iterator

Public Types

typedef std::string Attribute

Public Member Functions

 Attributes (AttributeIndex *attributeIndex)
 Attributes (AttributeIndex *attributeIndex, std::vector< Attribute > &values)
Attribute & operator[] (int i)
const_iterator begin () const
const_iterator end () const
std::string const * get (std::string &name) const
 Get the value of attribute with name name.
std::string const * get (char const *name) const
 Get the value of attribute with name name.
AttributeId index (char const *key) const
 Get the AttributeId for key key or WordIndex::None if not present.
void insert (char const *key, char const *value)
 Insert a new attribute with key key and value value.
void insert (char const *key, std::string const &value)
 Insert a new attribute with key key and value value.

Public Attributes

AttributeIndexattributeIndex
std::vector< Attribute > values

Static Public Attributes

static AttributeIndexemptyAttrIndex = new AttributeIndex()


Detailed Description

Represents the attributes of a token.

It behaves similarly to hash_map<char const*, string>, but it uses an internal map attributeIndex to provide access to attributes by name, which can be shared by tokens from the same corpus.

Definition at line 92 of file Token.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.