Tanl Linguistic Pipeline

Tanl::Token Struct Reference
[ClassifierDependency Parser]

Represents a sentence token (a word in a sentence). More...

#include <Token.h>

List of all members.

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
Contextcontext
 context

Detailed Description

Represents a sentence token (a word in a sentence).


Member Function Documentation

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]
Returns:
the attribute associated to key key, or 0 if not present.
std::string const* Tanl::Token::get ( char const *  key  )  const [inline]
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]

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.