NERsuite
1.1.1
|
#include <sentence_tagger.h>
Public Member Functions | |
SentenceTagger () | |
virtual | ~SentenceTagger () |
size_t | size () const |
bool | empty () const |
V2_STR::iterator | begin () |
V2_STR::iterator | end () |
V1_STR & | operator[] (size_t index) |
size_t | read (std::istream &ifs) |
void | tag_nes (const Dictionary &dict) |
Static Public Member Functions | |
static void | set_normalize_type (int nt) |
Sentence Tagger - internal class used to represent the sentence-token-feature array structure
This class has two main functionarities: reading a sentence to construct the structure, and appending Dictionary-class features to the structure.
This class reads a sentence block from a stream and creates a list of tokens. Each token consists of a list of features. After reading a sentence, the function tag_nes() will be used to append extra features which are retrieved from the given Dictionary.
NER::SentenceTagger::SentenceTagger | ( | ) |
Constructs a SentenceTagger object
virtual NER::SentenceTagger::~SentenceTagger | ( | ) | [inline, virtual] |
Destroys a SentenceTagger object
V2_STR::iterator NER::SentenceTagger::begin | ( | ) | [inline] |
The begin() iterator for the internal token list
bool NER::SentenceTagger::empty | ( | ) | const [inline] |
Test if the token list is empty. This function can be used to test whether the input read was an empty line.
V2_STR::iterator NER::SentenceTagger::end | ( | ) | [inline] |
The end() iterator for the internal token list
V1_STR& NER::SentenceTagger::operator[] | ( | size_t | index | ) | [inline] |
The array indexer operator for the internal token list
size_t NER::SentenceTagger::read | ( | std::istream & | ifs | ) |
Read a sentence from the given stream and create the internal token list.
static void NER::SentenceTagger::set_normalize_type | ( | int | nt | ) | [inline, static] |
Set Normalization Type used while a SentenceTagger queries the dictionary
[in] | nt | A combination of Normalization Types (OR of NormalizeType). |
size_t NER::SentenceTagger::size | ( | ) | const [inline] |
Get the size of sentence which this object is currentry processing.
void NER::SentenceTagger::tag_nes | ( | const Dictionary & | dict | ) |
Append dictionary-class features to the internal token list.
[in] | dict | The Dictionary used to search for feature classes. |