NERsuite  1.1.1
Public Member Functions | Static Public Member Functions
NER::SentenceTagger Class Reference

#include <sentence_tagger.h>

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

NER::SentenceTagger::SentenceTagger ( )

Constructs a SentenceTagger object

virtual NER::SentenceTagger::~SentenceTagger ( ) [inline, virtual]

Destroys a SentenceTagger object


Member Function Documentation

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.

Returns:
Returns true if empty.
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.

Returns:
Size of tokens read
static void NER::SentenceTagger::set_normalize_type ( int  nt) [inline, static]

Set Normalization Type used while a SentenceTagger queries the dictionary

Parameters:
[in]ntA 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.

Returns:
Returns the size of sentence (Count of tokens).
void NER::SentenceTagger::tag_nes ( const Dictionary dict)

Append dictionary-class features to the internal token list.

Parameters:
[in]dictThe Dictionary used to search for feature classes.

The documentation for this class was generated from the following files:
 All Classes Functions Variables