Frog
Public Member Functions | List of all members
IOBTagger Class Reference

#include <iob_tagger_mod.h>

Inheritance diagram for IOBTagger:
Inheritance graph
[legend]
Collaboration diagram for IOBTagger:
Collaboration graph
[legend]

Public Member Functions

 IOBTagger (TiCC::LogStream *l, TiCC::LogStream *d=0)
 
bool init (const TiCC::Configuration &)
 
void add_declaration (folia::Document &, folia::processor *) const
 
void Classify (frog_data &)
 
void post_process (frog_data &)
 
void add_result (const frog_data &fd, const std::vector< folia::Word * > &wv) const
 
- Public Member Functions inherited from BaseTagger
 BaseTagger (TiCC::LogStream *, TiCC::LogStream *, const std::string &)
 
virtual ~BaseTagger ()
 
void add_provenance (folia::Document &, folia::processor *) const
 
std::string getTagset () const
 
std::string set_eos_mark (const std::string &)
 
bool fill_map (const std::string &, std::map< std::string, std::string > &)
 
std::vector< Tagger::TagResult > tagLine (const std::string &)
 
std::vector< Tagger::TagResult > tag_entries (const std::vector< tag_entry > &)
 
std::string version () const
 

Additional Inherited Members

- Protected Member Functions inherited from BaseTagger
void extract_words_tags (const std::vector< folia::Word * > &, const std::string &, std::vector< std::string > &, std::vector< std::string > &)
 
std::vector< Tagger::TagResult > call_server (const std::vector< tag_entry > &) const
 
 BaseTagger (const BaseTagger &)
 
- Protected Attributes inherited from BaseTagger
int debug
 
std::string _label
 
std::string tagset
 
std::string _version
 
std::string textclass
 
TiCC::LogStream * err_log
 
TiCC::LogStream * dbg_log
 
std::string base
 
std::string _host
 
std::string _port
 
MbtAPI * tagger
 
TiCC::UniFilter * filter
 
std::vector< std::string > _words
 
std::vector< Tagger::TagResult > _tag_result
 
std::map< std::string, std::string > token_tag_map
 

Constructor & Destructor Documentation

◆ IOBTagger()

IOBTagger::IOBTagger ( TiCC::LogStream *  l,
TiCC::LogStream *  d = 0 
)
inlineexplicit

Member Function Documentation

◆ add_declaration()

void IOBTagger::add_declaration ( folia::Document &  doc,
folia::processor *  proc 
) const
virtual

add CHUNKING annotation as an AnnotationType to the document

Parameters
docthe Document the add to
procthe processor to add

Implements BaseTagger.

◆ add_result()

void IOBTagger::add_result ( const frog_data fd,
const std::vector< folia::Word * > &  wv 
) const

add the Chunking tags in 'fd' to the FoLiA list of Word

Parameters
fdThe tagged results
wvThe folia:Word vector

◆ Classify()

void IOBTagger::Classify ( frog_data swords)
virtual

Tag one sentence, given in frog_data format

Parameters
swordsthe frog_data structure to analyze

When tagging succeeds, 'swords' will be extended with the tag results

Reimplemented from BaseTagger.

◆ init()

bool IOBTagger::init ( const TiCC::Configuration &  config)
virtual

initalize a IOB chunker from 'config'

Parameters
configthe TiCC::Configuration
Returns
true on succes, false otherwise

first BaseTagger::init() is called to set generic values, then the IOB specific values 'set' is added

Reimplemented from BaseTagger.

◆ post_process()

void IOBTagger::post_process ( frog_data sentence)
virtual

finish the Chunking processs by updating 'sentence'

Parameters
sentencea frog_data structure to update with Chunking info from the _tag_result array.

Implements BaseTagger.


The documentation for this class was generated from the following files: