DeSR Dependency Parser |
#include <Token.h>
Classes | |
struct | Morpho |
Compact morphology representation. More... | |
Public Member Functions | |
Token (std::string form, Attributes &attributes) | |
Token (std::string form, Attributes &attributes, TokenLinks &links) | |
Token (Attributes &attributes) | |
Token (std::string &form, AttributeIndex *attributeIndex) | |
Token (char const *form, AttributeIndex *attributeIndex) | |
Token (AttributeIndex *attributeIndex) | |
std::string const * | get (char const *key) const |
void | set (char const *key, char const *value) |
Add the attribute value associated to key key . | |
void | set (char const *key, std::string const &value) |
Add the attribute value associated to key key . | |
int | attrIndex (char const *name) const |
Get the index of a given attribute name . | |
bool | isNoun (Language const *lang) |
bool | isPreposition (Language const *lang) |
bool | isTime (Language const *lang) |
bool | isLocation (Language const *lang) |
bool | isVerb (Language const *lang) |
std::string const * | getLemma () const |
std::string const * | getPos () const |
void | print (std::ostream &os, int indent=0) const |
output token in XML format | |
Public Attributes | |
std::string | form |
word form | |
Morpho | morpho |
morphology | |
Attributes | attributes |
additional attributes | |
TokenLinks | links |
additional links |
Definition at line 208 of file Token.h.
int Tanl::Token::attrIndex | ( | char const * | name | ) | const [inline] |
Get the index of a given attribute name
.
Definition at line 306 of file Token.h.
References Tanl::Attributes::attributeIndex, attributes, and Tanl::AttributeIndex::names.
std::string const* Tanl::Token::get | ( | char const * | key | ) | const [inline] |
key
, or 0 if not present. Definition at line 291 of file Token.h.
References attributes, and Tanl::Attributes::get().
void Tanl::Token::set | ( | char const * | key, | |
std::string const & | value | |||
) | [inline] |
Add the attribute value
associated to key key
.
Definition at line 301 of file Token.h.
References attributes, and Tanl::Attributes::insert().
void Tanl::Token::set | ( | char const * | key, | |
char const * | value | |||
) | [inline] |
Add the attribute value
associated to key key
.
Definition at line 296 of file Token.h.
References attributes, and Tanl::Attributes::insert().
Referenced by Tanl::TreeToken::set().