ZGen
0.2.0
a linearization system for natural language.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
bestfirst
model
model.h
Go to the documentation of this file.
1
#ifndef __ZGEN_BESTFRIST_MODEL_H__
2
#define __ZGEN_BESTFRIST_MODEL_H__
3
4
#include "settings.h"
5
#include "
bestfirst/search/span.h
"
6
#include "
bestfirst/model/score_map.h
"
7
8
namespace
ZGen {
9
10
namespace
BestFirst {
11
12
class
Model
{
13
public
:
14
Model
();
15
22
floatval_t
score
(
const
Span
& span,
bool
avg)
const
;
23
30
floatval_t
score
(
const
ScoreContext
& ctx,
bool
avg)
const
;
31
39
void
update
(
const
Span
& span,
int
timestamp,
floatval_t
scale);
40
48
void
update
(
const
ScoreContext
& ctx,
int
timestamp,
floatval_t
scale);
49
50
void
flush
(
int
timestamp);
51
59
bool
load
(std::istream& is);
60
68
bool
save
(std::ostream& os);
69
private
:
70
std::vector< ScoreMap<UnigramScore> > uscore_repo;
71
std::vector< ScoreMap<BigramScore> > bscore_repo;
72
std::vector< ScoreMap<TrigramScore> > tscore_repo;
73
};
74
75
}
// end for namespace Bestfirst
76
}
// end for namespace ZGen
77
78
79
#endif // end for __ZGEN_BESTFRIST_MODEL_H__
span.h
ZGen::BestFirst::Model::save
bool save(std::ostream &os)
Definition:
model.cc:150
ZGen::BestFirst::Model::Model
Model()
Definition:
model.cc:73
score_map.h
ZGen::BestFirst::Model::flush
void flush(int timestamp)
Definition:
model.cc:135
ZGen::floatval_t
double floatval_t
Definition:
settings.h:24
ZGen::BestFirst::Model::load
bool load(std::istream &is)
Definition:
model.cc:168
ZGen::BestFirst::Model::update
void update(const Span &span, int timestamp, floatval_t scale)
Definition:
model.cc:114
ZGen::BestFirst::Model
Definition:
model.h:12
ZGen::BestFirst::ScoreContext
Definition:
score_context.h:13
ZGen::BestFirst::Span
Definition:
span.h:13
ZGen::BestFirst::Model::score
floatval_t score(const Span &span, bool avg) const
Definition:
model.cc:90
Generated by
1.8.6