Tanl Linguistic Pipeline

Tanl::Attributes Struct Reference
[ClassifierDependency Parser]

Represents the attributes of a token. More...

#include <Token.h>

List of all members.

Classes

struct  const_iterator

Public Types

typedef std::string Attribute
typedef std::string Attribute

Public Member Functions

 Attributes (AttributeIndex *attributeIndex)
 Attributes (AttributeIndex *attributeIndex, std::vector< Attribute > &values)
Attribute & operator[] (int i)
bool operator== (const Attributes &other)
bool operator!= (const Attributes &other)
const_iterator begin () const
const_iterator end () const
std::string const * get (std::string const &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.
void insert (char const *key, int value)
 Insert a new attribute with key key and value value.
 Attributes (AttributeIndex *attributeIndex)
 Attributes (AttributeIndex *attributeIndex, std::vector< Attribute > &values)
Attribute & operator[] (int i)
bool operator== (const Attributes &other)
bool operator!= (const Attributes &other)
const_iterator begin () const
const_iterator end () const
std::string const * get (std::string const &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.
void insert (char const *key, int 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.


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.