MosesTuning::M2::M2 Class Reference

#include <M2.h>

List of all members.

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)


Detailed Description

Definition at line 132 of file M2.h.


Constructor & Destructor Documentation

MosesTuning::M2::M2::M2 (  )  [inline]

Definition at line 143 of file M2.h.

MosesTuning::M2::M2::M2 ( size_t  max_unchanged,
float  beta,
bool  truecase,
bool  verbose = false 
) [inline]

Definition at line 144 of file M2.h.

References MosesTuning::M2::Annot::lowercase.


Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTuning::M2::M2::AddWeights ( Edges E,
const Unit u,
size_t  aid 
) [inline]

Definition at line 297 of file M2.h.

References MosesTuning::M2::Unit::second, and MosesTuning::M2::Annot::transform().

Referenced by SufStats().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTuning::M2::M2::BellmanFord ( Vertices V,
Edges E 
) [inline]

Definition at line 314 of file M2.h.

Referenced by SufStats().

Here is the caller graph for this function:

float MosesTuning::M2::M2::Beta (  )  [inline]

Definition at line 151 of file M2.h.

void MosesTuning::M2::M2::BuildGraph ( const TrackMatrix bt,
Vertices V,
Edges E 
) [inline]

void MosesTuning::M2::M2::FScore ( const Stats stats,
float &  p,
float &  r,
float &  f 
) [inline]

Definition at line 462 of file M2.h.

float MosesTuning::M2::M2::FScore ( const Stats stats  )  [inline]

Definition at line 446 of file M2.h.

Referenced by AddStats().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTuning::M2::M2::ReadM2 ( const std::string &  filename  )  [inline]

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.

Here is the call graph for this function:


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

Generated on Thu Jul 6 00:34:21 2017 for Moses by  doxygen 1.5.9