ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ZGen::BestFirst::Model Class Reference

#include <model.h>

Public Member Functions

 Model ()
 
floatval_t score (const Span &span, bool avg) const
 
floatval_t score (const ScoreContext &ctx, bool avg) const
 
void update (const Span &span, int timestamp, floatval_t scale)
 
void update (const ScoreContext &ctx, int timestamp, floatval_t scale)
 
void flush (int timestamp)
 
bool load (std::istream &is)
 
bool save (std::ostream &os)
 

Constructor & Destructor Documentation

ZGen::BestFirst::Model::Model ( )

Member Function Documentation

void ZGen::BestFirst::Model::flush ( int  timestamp)
bool ZGen::BestFirst::Model::load ( std::istream &  is)

Load model from the input stream.

Parameters
[in]ifsThe input stream.
Returns
bool If successfully loaded, return true; otherwise return false.
bool ZGen::BestFirst::Model::save ( std::ostream &  os)

Save model to the output stream.

Parameters
[out]ofsThe output stream.
Returns
bool If successfully saved, return true; otherwise return false.
floatval_t ZGen::BestFirst::Model::score ( const Span span,
bool  avg 
) const
floatval_t ZGen::BestFirst::Model::score ( const ScoreContext ctx,
bool  avg 
) const

Scoring the span.

Parameters
[in]ctxThe span context.
Returns
floatval_t The score for the span.
void ZGen::BestFirst::Model::update ( const Span span,
int  timestamp,
floatval_t  scale 
)

Update the model parameters according to the model.

Parameters
[in]spanThe span.
[in]timestampThe timestamp.
[in]scaleThe update scale.
void ZGen::BestFirst::Model::update ( const ScoreContext ctx,
int  timestamp,
floatval_t  scale 
)

Update the model parameters according to the model.

Parameters
[in]spanThe span.
[in]timestampThe timestamp.
[in]scaleThe update scale.

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