FreeLing  3.0
Public Member Functions | Protected Attributes
ner_module Class Reference

The class ner is an abstract class that implements a general NE Recognizer. More...

#include <ner_module.h>

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

List of all members.

Public Member Functions

 ner_module (const std::wstring &)
virtual ~ner_module ()
virtual int ComputeToken (int, sentence::iterator &, sentence &)
 Allow classes under ner to be incomplete automata.
virtual void ResetActions ()
 pure virtual function to be provided by the child class .
virtual void StateActions (int, int, int, sentence::const_iterator)
 pure virtual function to be provided by the child class.
virtual void SetMultiwordAnalysis (sentence::iterator, int)
 Set the appropriate lemma and tag for the new multiword.
bool ValidMultiWord (const word &)
 Perform last minute validation before effectively building multiword.
sentence::iterator BuildMultiword (sentence &, sentence::iterator, sentence::iterator, int, bool &)
 Build a Multiword and sets its analysis.

Protected Attributes

unsigned int Title_length
 length beyond which a multiword made of all capitialized words ("WRECKAGE: TITANIC DISAPPEARS IN NORTHERN SEA") will be considered a title and not a proper noun.
unsigned int AllCaps_Title_length
std::wstring NE_tag
 Tag to assign to detected NEs.
bool splitNPs
 if we want to split NEs, set this to true

Detailed Description

The class ner is an abstract class that implements a general NE Recognizer.


Constructor & Destructor Documentation

ner_module::ner_module ( const std::wstring &  )
virtual ner_module::~ner_module ( ) [inline, virtual]

Member Function Documentation

sentence::iterator ner_module::BuildMultiword ( sentence se,
sentence::iterator  start,
sentence::iterator  end,
int  fs,
bool built 
) [virtual]

Build a Multiword and sets its analysis.

Effectively build multiword, altering sentence.

Reimplemented from automat.

References util::is_capitalized(), and TRACE.

Referenced by bioner::analyze().

int ner_module::ComputeToken ( int  ,
sentence::iterator &  ,
sentence  
) [virtual]

Allow classes under ner to be incomplete automata.

Implements automat.

Reimplemented in np.

void ner_module::ResetActions ( ) [virtual]

pure virtual function to be provided by the child class .

Resets automaton internal variables when a new search is started.

Implements automat.

Reimplemented in np.

void ner_module::SetMultiwordAnalysis ( sentence::iterator  i,
int  fstate 
) [virtual]

Set the appropriate lemma and tag for the new multiword.

Implements automat.

Reimplemented in np.

References TRACE.

void ner_module::StateActions ( int  ,
int  ,
int  ,
sentence::const_iterator   
) [virtual]

pure virtual function to be provided by the child class.

Performs appropriate internal actions, given origin and destinanation states, token code and word.

Implements automat.

Reimplemented in np.

bool ner_module::ValidMultiWord ( const word w) [virtual]

Perform last minute validation before effectively building multiword.

Reimplemented from automat.

References word::get_words_mw(), and util::has_lowercase().


Member Data Documentation

unsigned int ner_module::AllCaps_Title_length [protected]
std::wstring ner_module::NE_tag [protected]

Tag to assign to detected NEs.

if we want to split NEs, set this to true

unsigned int ner_module::Title_length [protected]

length beyond which a multiword made of all capitialized words ("WRECKAGE: TITANIC DISAPPEARS IN NORTHERN SEA") will be considered a title and not a proper noun.

A value of zero deactivates this behaviour.


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