DeSR Dependency Parser |
#include <Token.h>
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 | |
AttributeIndex * | attributeIndex |
std::vector< Attribute > | values |
Static Public Attributes | |
static AttributeIndex * | emptyAttrIndex = new AttributeIndex() |
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.