opencog::ReportRank Class Reference

#include <ReportRank.h>

List of all members.

Public Member Functions

 ReportRank (void)
 ~ReportRank ()
void report_sentence (Handle)
void report_parse (Handle)
void report_document (const std::deque< Handle > &)

Private Member Functions

bool report_parse_f (Handle)
bool count_word (Handle)
bool count_sense (Handle, Handle)
bool renorm_parse (Handle)
bool renorm_word (Handle)
bool renorm_sense (Handle, Handle)

Private Attributes

int parse_cnt
int word_count
double normalization
double sense_count
double choosen_sense_count
double hi_score
const char * hi_sense


Detailed Description

Definition at line 20 of file ReportRank.h.


Constructor & Destructor Documentation

ReportRank::ReportRank ( void   ) 

Definition at line 24 of file ReportRank.cc.

References parse_cnt.

ReportRank::~ReportRank (  ) 

Definition at line 29 of file ReportRank.cc.


Member Function Documentation

bool ReportRank::report_parse_f ( Handle  h  )  [private]

Definition at line 116 of file ReportRank.cc.

References report_parse().

Here is the caller graph for this function:

bool ReportRank::count_word ( Handle  h  )  [private]

Definition at line 122 of file ReportRank.cc.

References count_sense(), opencog::foreach_word_sense_of_inst(), and word_count.

Here is the caller graph for this function:

bool ReportRank::count_sense ( Handle  word_sense_h,
Handle  sense_link_h 
) [private]

Definition at line 147 of file ReportRank.cc.

References opencog::TLB::getAtom(), opencog::TruthValue::getCount(), opencog::Atom::getTruthValue(), normalization, and sense_count.

Here is the caller graph for this function:

bool opencog::ReportRank::renorm_parse ( Handle   )  [private]

bool ReportRank::renorm_word ( Handle  h  )  [private]

bool ReportRank::renorm_sense ( Handle  word_sense_h,
Handle  sense_link_h 
) [private]

void ReportRank::report_sentence ( Handle  h  ) 

For each parse of the sentence, make a report.

Definition at line 36 of file ReportRank.cc.

References opencog::foreach_parse(), parse_cnt, and report_parse_f().

void ReportRank::report_parse ( Handle  h  ) 

Same as report_document, but done only for one parse

Definition at line 97 of file ReportRank.cc.

References choosen_sense_count, count_word(), opencog::foreach_word_instance(), normalization, parse_cnt, renorm_word(), and sense_count.

Here is the caller graph for this function:

void ReportRank::report_document ( const std::deque< Handle > &  parse_list  ) 

Renormalize the distribution of senses for this document, store result in the truth values.

After running the graph algo, scores will have flowed to different senses, with many senses getting a strong boost, others loosing out. This code renormalizes the scores so that they are expressed as a deviation from a mean. This is done in two (conceptual) steps: 1) renormalize so that the mean score is 1.0 2) subtract 1.0 from all scores. The result of doing this is that unlikely senses get netgative scores, likely senses get strong positive scores. It appears that "typical" distributions seem to go from -0.8 to +3.5 or there-abouts.

Definition at line 57 of file ReportRank.cc.

References choosen_sense_count, count_word(), opencog::foreach_word_instance(), normalization, renorm_word(), sense_count, and word_count.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 23 of file ReportRank.h.

Definition at line 28 of file ReportRank.h.

Definition at line 29 of file ReportRank.h.

Definition at line 30 of file ReportRank.h.

Definition at line 31 of file ReportRank.h.

Definition at line 36 of file ReportRank.h.

const char* opencog::ReportRank::hi_sense [private]

Definition at line 37 of file ReportRank.h.


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

Generated on Fri Dec 4 23:24:39 2009 for OpenCog Framework by  doxygen 1.5.6