The class bioner implements an AdaBoost-Based NE recognizer. More...
#include <bioner.h>
Public Member Functions | |
bioner (const std::string &) | |
Constructor. | |
~bioner () | |
Destructor. | |
void | annotate (sentence &) |
Recognize NEs in given sentence. | |
sentence::iterator | BuildMultiword (sentence &, sentence::iterator, sentence::iterator, bool &) const |
Build a Multiword and sets its analysis. | |
void | SetMultiwordAnalysis (sentence::iterator) const |
Set the appropriate lemma and parole for the new multiword. | |
bool | ValidMultiWord (const word &) const |
Perform last minute validation before effectively building multiword. | |
Private Attributes | |
std::map< int, std::string > | class_name |
translation from name to class number | |
fex * | extractor |
feature extractor | |
std::map< std::string, int > | lexicon |
lexicon to translate symbolic features to integer indexes | |
adaboost * | classifier |
adaboost classifier | |
vis_viterbi | vit |
viterbi class to compute best path |
The class bioner implements an AdaBoost-Based NE recognizer.
bioner::bioner | ( | const std::string & | conf_file | ) |
Constructor.
Perform named entity recognition using AdaBoost.
Create a named entity recognition module, loading appropriate files.
References class_name, classifier, ERROR_CRASH, extractor, ner::NE_tag, ner::splitNPs, ner::Title_length, and TRACE.
bioner::~bioner | ( | ) |
void bioner::annotate | ( | sentence & | se | ) | [virtual] |
Recognize NEs in given sentence.
Implements ner.
References BuildMultiword(), class_name, classifier, extractor, vis_viterbi::find_best_path(), TRACE, TRACE_SENTENCE, and vit.
sentence::iterator bioner::BuildMultiword | ( | sentence & | se, | |
sentence::iterator | start, | |||
sentence::iterator | end, | |||
bool & | built | |||
) | const |
Build a Multiword and sets its analysis.
BuildMultiword: given a sentence and the position where a multiword starts and ends, build the multiword.
References ner::NE_tag, SetMultiwordAnalysis(), ner::splitNPs, TRACE, and ValidMultiWord().
Referenced by annotate().
void bioner::SetMultiwordAnalysis | ( | sentence::iterator | i | ) | const |
Set the appropriate lemma and parole for the new multiword.
References ner::NE_tag, and TRACE.
Referenced by BuildMultiword().
bool bioner::ValidMultiWord | ( | const word & | w | ) | const |
Perform last minute validation before effectively building multiword.
References ner::Title_length.
Referenced by BuildMultiword().
std::map<int,std::string> bioner::class_name [private] |
translation from name to class number
Referenced by annotate(), and bioner().
adaboost* bioner::classifier [private] |
adaboost classifier
Referenced by annotate(), bioner(), and ~bioner().
fex* bioner::extractor [private] |
feature extractor
Referenced by annotate(), bioner(), and ~bioner().
std::map<std::string,int> bioner::lexicon [private] |
lexicon to translate symbolic features to integer indexes
vis_viterbi bioner::vit [private] |
viterbi class to compute best path
Referenced by annotate().