#include <M2.h>
Public Member Functions | |
M2 () | |
M2 (size_t max_unchanged, float beta, bool truecase, bool verbose=false) | |
float | Beta () |
void | ReadM2 (const std::string &filename) |
size_t | LevenshteinMatrix (const Sentence &s1, const Sentence &s2, Matrix &d, TrackMatrix &bt) |
void | BuildGraph (const TrackMatrix &bt, Vertices &V, Edges &E) |
void | AddWeights (Edges &E, const Unit &u, size_t aid) |
void | BellmanFord (Vertices &V, Edges &E) |
void | AddStats (const std::vector< Edges > &Es, const Unit &u, Stats &stats, size_t line) |
void | SufStats (const std::string &sStr, size_t i, Stats &stats) |
float | FScore (const Stats &stats) |
void | FScore (const Stats &stats, float &p, float &r, float &f) |
Definition at line 132 of file M2.h.
MosesTuning::M2::M2::M2 | ( | size_t | max_unchanged, | |
float | beta, | |||
bool | truecase, | |||
bool | verbose = false | |||
) | [inline] |
void MosesTuning::M2::M2::AddStats | ( | const std::vector< Edges > & | Es, | |
const Unit & | u, | |||
Stats & | stats, | |||
size_t | line | |||
) | [inline] |
Definition at line 359 of file M2.h.
References MosesTuning::M2::Annot::annotator, begin, MosesTuning::M2::Annot::edit, FScore(), MosesTuning::M2::Annot::i, MosesTuning::M2::Annot::j, MosesTuning::M2::Unit::second, and MosesTuning::M2::Unit::third.
Referenced by SufStats().
Definition at line 297 of file M2.h.
References MosesTuning::M2::Unit::second, and MosesTuning::M2::Annot::transform().
Referenced by SufStats().
Definition at line 314 of file M2.h.
Referenced by SufStats().
void MosesTuning::M2::M2::BuildGraph | ( | const TrackMatrix & | bt, | |
Vertices & | V, | |||
Edges & | E | |||
) | [inline] |
Definition at line 259 of file M2.h.
References MosesTuning::M2::Edit::changed, MosesTuning::M2::Edge::edit, MosesTuning::M2::Vertex::i, MosesTuning::M2::Vertex::j, MosesTuning::M2::Edit::unchanged, and MosesTuning::M2::Edge::v.
Referenced by SufStats().
void MosesTuning::M2::M2::FScore | ( | const Stats & | stats, | |
float & | p, | |||
float & | r, | |||
float & | f | |||
) | [inline] |
float MosesTuning::M2::M2::FScore | ( | const Stats & | stats | ) | [inline] |
Definition at line 446 of file M2.h.
Referenced by AddStats().
size_t MosesTuning::M2::M2::LevenshteinMatrix | ( | const Sentence & | s1, | |
const Sentence & | s2, | |||
Matrix & | d, | |||
TrackMatrix & | bt | |||
) | [inline] |
Definition at line 210 of file M2.h.
References m, n, and MosesTuning::M2::Annot::transform().
Referenced by SufStats().
void MosesTuning::M2::M2::ReadM2 | ( | const std::string & | filename | ) | [inline] |
Definition at line 155 of file M2.h.
References MosesTuning::M2::Annot::annotator, MosesTuning::M2::Annot::edit, MosesTuning::M2::Unit::first, MosesTuning::M2::Annot::i, MosesTuning::M2::Annot::j, MosesTuning::M2::Unit::second, MosesTuning::split(), MosesTuning::M2::Unit::third, and MosesTuning::M2::Annot::type.
void MosesTuning::M2::M2::SufStats | ( | const std::string & | sStr, | |
size_t | i, | |||
Stats & | stats | |||
) | [inline] |
Definition at line 412 of file M2.h.
References AddStats(), AddWeights(), BellmanFord(), BuildGraph(), MosesTuning::M2::Unit::first, LevenshteinMatrix(), MosesTuning::split(), and MosesTuning::M2::Unit::third.