| Tanl Linguistic Pipeline |
Represents a sentence token (a word in a sentence). More...
#include <Token.h>
Classes | |
| struct | Morpho |
| Compact morphology representation. More... | |
Public Member Functions | |
| Token (std::string &form, Attributes &attributes, Context *context=0) | |
| Token (std::string &form, Attributes &attributes, TokenLinks &links, Context *context=0) | |
| Token (Attributes &attributes, Context *context=0) | |
| Token (std::string &form, AttributeIndex *attributeIndex, Context *context=0) | |
| Token (char const *form, AttributeIndex *attributeIndex, Context *context=0) | |
| Token (AttributeIndex *attributeIndex, Context *context=0) | |
| std::string const & | operator[] (char const *key) |
| 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. | |
| void | set (char const *key, int value) |
Add the attribute value associated to key key. | |
| int | attrIndex (char const *name) const |
Get the index of a given attribute name. | |
| bool | operator== (const Token &other) |
| bool | operator!= (const Token &other) |
| void | print (std::ostream &os, int indent=0) const |
| output token in XML format | |
| void | printTab (std::ostream &os, Corpus const &corpus) |
| Token (Token const &tok) | |
| Token (std::string &form, Attributes &attributes, Context *context=0) | |
| Token (std::string &form, Attributes &attributes, TokenLinks &links, Context *context=0) | |
| Token (Attributes &attributes, Context *context=0) | |
| Token (std::string &form, AttributeIndex *attributeIndex, Context *context=0) | |
| Token (char const *form, AttributeIndex *attributeIndex, Context *context=0) | |
| Token (std::string &form, Corpus &corpus, Context *context=0) | |
| Token (AttributeIndex *attributeIndex, Context *context=0) | |
| std::string const & | operator[] (char const *key) |
| 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. | |
| void | set (char const *key, int value) |
Add the attribute value associated to key key. | |
| int | attrIndex (char const *name) const |
Get the index of a given attribute name. | |
| bool | operator== (const Token &other) |
| bool | operator!= (const Token &other) |
| 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 * | lemma () const |
| void | lemma (std::string const &) |
| std::string const * | pos () const |
| void | pos (std::string 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 | |
| Context * | context |
| context | |
Represents a sentence token (a word in a sentence).
| int Tanl::Token::attrIndex | ( | char const * | name | ) | const [inline] |
Get the index of a given attribute name.
| int Tanl::Token::attrIndex | ( | char const * | name | ) | const [inline] |
Get the index of a given attribute name.
Referenced by Tanl::SST::SstFeatureExtractor::extract(), and Tanl::NER::NerFeatureExtractor::extract().
| std::string const* Tanl::Token::get | ( | char const * | key | ) | const [inline] |
key, or 0 if not present. | std::string const* Tanl::Token::get | ( | char const * | key | ) | const [inline] |
key, or 0 if not present. Referenced by Tanl::NER::NerFeatureExtractor::analyze(), Tanl::SST::SstFeatureExtractor::extract(), Tanl::NER::NerFeatureExtractor::extract(), Tanl::TreeToken::get(), Tanl::SST::SstEventStream::next(), Tanl::NER::NerEventStream::next(), Tanl::TreeToken::predicted(), and Tanl::NER::NER::tag().
| void Tanl::Token::set | ( | char const * | key, | |
| int | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
| void Tanl::Token::set | ( | char const * | key, | |
| std::string const & | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
| void Tanl::Token::set | ( | char const * | key, | |
| char const * | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
| void Tanl::Token::set | ( | char const * | key, | |
| int | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
| void Tanl::Token::set | ( | char const * | key, | |
| std::string const & | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
| void Tanl::Token::set | ( | char const * | key, | |
| char const * | value | |||
| ) | [inline] |
Add the attribute value associated to key key.
Referenced by Tanl::NER::NerFeatureExtractor::analyze(), Tanl::SST::SstFeatureExtractor::classified(), Tanl::NER::NerFeatureExtractor::classified(), Tanl::TokenizerPipe::Current(), Tanl::POS::PosTaggerPipe::MoveNext(), Tanl::MorphStream::MoveNext(), and Tanl::TreeToken::set().