FreeLing  4.0
Public Member Functions | Private Member Functions | Private Attributes
freeling::np Class Reference

The class np implements a simple proper noun recognizer. More...

#include <np.h>

Inheritance diagram for freeling::np:
Inheritance graph
[legend]
Collaboration diagram for freeling::np:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 np (const std::wstring &)
 Constructor.

Private Member Functions

int ComputeToken (int, sentence::iterator &, sentence &) const
 Compute the right token code for word j from given state.
void ResetActions (ner_status *) const
 Reset flag about capitalized noun at sentence start.
void StateActions (int, int, int, sentence::const_iterator, ner_status *) const
 Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, set flag about capitalized noun at sentence start.
void SetMultiwordAnalysis (sentence::iterator, int, const ner_status *) const
 Set the appropriate lemma and tag for the new multiword.

Private Attributes

std::set< std::wstring > func
 set of function words
std::set< std::wstring > punct
 set of special punctuation tags
std::set< std::wstring > names
 set of words to be considered possible NPs at sentence beggining
std::map< std::wstring, intignore_tags
 set of words/tags to be ignored as NE parts, even if they are capitalized
std::map< std::wstring, intignore_words
std::set< std::wstring > prefixes
 sets of NE affixes
std::set< std::wstring > suffixes
freeling::regexp RE_NounAdj
freeling::regexp RE_Closed
freeling::regexp RE_DateNumPunct

Detailed Description

The class np implements a simple proper noun recognizer.


Constructor & Destructor Documentation

freeling::np::np ( const std::wstring &  npFile)

Member Function Documentation

int freeling::np::ComputeToken ( int  state,
sentence::iterator &  j,
sentence se 
) const [private, virtual]

Compute the right token code for word j from given state.

Reimplemented from freeling::ner_module.

References ignore_tags, ignore_words, punct, and TK_other.

void freeling::np::ResetActions ( ner_status st) const [private, virtual]

Reset flag about capitalized noun at sentence start.

Reimplemented from freeling::ner_module.

References freeling::ner_status::initialNoun.

void freeling::np::SetMultiwordAnalysis ( sentence::iterator  i,
int  fstate,
const ner_status st 
) const [private, virtual]

Set the appropriate lemma and tag for the new multiword.

Reimplemented from freeling::ner_module.

References freeling::ner_status::initialNoun, and TRACE.

void freeling::np::StateActions ( int  origin,
int  state,
int  token,
sentence::const_iterator  j,
ner_status st 
) const [private, virtual]

Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, set flag about capitalized noun at sentence start.

Reimplemented from freeling::ner_module.

References freeling::ner_status::initialNoun, int2wstring, ST_NP, TK_sNounUpp, and TRACE.


Member Data Documentation

std::set<std::wstring> freeling::np::func [private]

set of function words

Referenced by np().

std::map<std::wstring,int> freeling::np::ignore_tags [private]

set of words/tags to be ignored as NE parts, even if they are capitalized

Referenced by ComputeToken(), and np().

std::map<std::wstring,int> freeling::np::ignore_words [private]

Referenced by ComputeToken(), and np().

std::set<std::wstring> freeling::np::names [private]

set of words to be considered possible NPs at sentence beggining

Referenced by np().

std::set<std::wstring> freeling::np::prefixes [private]

sets of NE affixes

Referenced by np().

std::set<std::wstring> freeling::np::punct [private]

set of special punctuation tags

Referenced by ComputeToken(), and np().

Referenced by np().

Referenced by np().

Referenced by np().

std::set<std::wstring> freeling::np::suffixes [private]

Referenced by np().


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