TERCpp::terCalc Class Reference

#include <tercalc.h>

Collaboration diagram for TERCpp::terCalc:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 terCalc ()
void setDebugMode (bool b)
int WERCalculation (size_t *ref, size_t *hyp)
int WERCalculation (vector< string > ref, vector< string > hyp)
int WERCalculation (vector< int > ref, vector< int > hyp)
hashMapInfos BuildWordMatches (vector< string > hyp, vector< string > ref)
terAlignment MinEditDist (vector< string > hyp, vector< string > ref, vector< vecInt > curHypSpans)
bool spanIntersection (vecInt refSpan, vecInt hypSpan)
terAlignment TER (vector< string > hyp, vector< string > ref, float avRefLength)
terAlignment TER (vector< string > hyp, vector< string > ref)
terAlignment TER (vector< int > hyp, vector< int > ref)
bestShiftStruct CalcBestShift (vector< string > cur, vector< string > hyp, vector< string > ref, hashMapInfos rloc, terAlignment cur_align)
void FindAlignErr (terAlignment align, bool *herr, bool *rerr, int *ralign)
vector< vecTerShiftGatherAllPossShifts (vector< string > hyp, vector< string > ref, hashMapInfos rloc, terAlignment align, bool *herr, bool *rerr, int *ralign)
alignmentStruct PerformShift (vector< string > words, terShift s)
alignmentStruct PerformShift (vector< string > words, int start, int end, int newloc)

Public Attributes

int shift_cost
int insert_cost
int delete_cost
int substitute_cost
int match_cost
double INF


Detailed Description

Author:

Definition at line 28 of file tercalc.h.


Constructor & Destructor Documentation

TERCpp::terCalc::terCalc (  ) 

Definition at line 18 of file tercalc.cpp.

References delete_cost, INF, insert_cost, match_cost, shift_cost, and substitute_cost.


Member Function Documentation

hashMapInfos TERCpp::terCalc::BuildWordMatches ( vector< string >  hyp,
vector< string >  ref 
)

Definition at line 401 of file tercalc.cpp.

References HashMapSpace::hashMap::addHasher(), HashMapSpace::hashMapInfos::addValue(), end, HashMapSpace::hashMapInfos::getValue(), HashMapSpace::hashMapInfos::setValue(), Tools::subVector(), HashMapSpace::hashMap::trouve(), and Tools::vectorToString().

Referenced by TER().

Here is the call graph for this function:

Here is the caller graph for this function:

bestShiftStruct TERCpp::terCalc::CalcBestShift ( vector< string >  cur,
vector< string >  hyp,
vector< string >  ref,
hashMapInfos  rloc,
terAlignment  cur_align 
)

void TERCpp::terCalc::FindAlignErr ( terAlignment  align,
bool *  herr,
bool *  rerr,
int *  ralign 
)

Definition at line 731 of file tercalc.cpp.

References TERCpp::terAlignment::alignment, and TERCpp::terAlignment::toString().

Referenced by CalcBestShift().

Here is the call graph for this function:

Here is the caller graph for this function:

vector< vecTerShift > TERCpp::terCalc::GatherAllPossShifts ( vector< string >  hyp,
vector< string >  ref,
hashMapInfos  rloc,
terAlignment  align,
bool *  herr,
bool *  rerr,
int *  ralign 
)

Definition at line 768 of file tercalc.cpp.

References TERCpp::terShift::cost, end, HashMapSpace::hashMapInfos::getValue(), shift_cost, TERCpp::terShift::shifted, Tools::subVector(), HashMapSpace::hashMapInfos::trouve(), and Tools::vectorToString().

Referenced by CalcBestShift().

Here is the call graph for this function:

Here is the caller graph for this function:

terAlignment TERCpp::terCalc::MinEditDist ( vector< string >  hyp,
vector< string >  ref,
vector< vecInt >  curHypSpans 
)

Definition at line 443 of file tercalc.cpp.

References TERCpp::terAlignment::alignment, delete_cost, INF, insert_cost, match_cost, TERCpp::terAlignment::numEdits, TERCpp::terAlignment::numWords, spanIntersection(), substitute_cost, and TERCpp::terAlignment::toString().

Referenced by CalcBestShift(), and TER().

Here is the call graph for this function:

Here is the caller graph for this function:

alignmentStruct TERCpp::terCalc::PerformShift ( vector< string >  words,
int  start,
int  end,
int  newloc 
)

Definition at line 905 of file tercalc.cpp.

alignmentStruct TERCpp::terCalc::PerformShift ( vector< string >  words,
terShift  s 
)

Definition at line 899 of file tercalc.cpp.

References TERCpp::terShift::end, TERCpp::terShift::newloc, and TERCpp::terShift::start.

Referenced by CalcBestShift().

Here is the caller graph for this function:

void TERCpp::terCalc::setDebugMode ( bool  b  ) 

Definition at line 1030 of file tercalc.cpp.

bool TERCpp::terCalc::spanIntersection ( vecInt  refSpan,
vecInt  hypSpan 
)

Definition at line 434 of file tercalc.cpp.

Referenced by MinEditDist().

Here is the caller graph for this function:

terAlignment TERCpp::terCalc::TER ( vector< int >  hyp,
vector< int >  ref 
)

terAlignment TERCpp::terCalc::TER ( vector< string >  hyp,
vector< string >  ref 
)

terAlignment TERCpp::terCalc::TER ( vector< string >  hyp,
vector< string >  ref,
float  avRefLength 
)

int TERCpp::terCalc::WERCalculation ( vector< int >  ref,
vector< int >  hyp 
)

int TERCpp::terCalc::WERCalculation ( vector< string >  ref,
vector< string >  hyp 
)

Definition at line 153 of file tercalc.cpp.

References k, and m.

int TERCpp::terCalc::WERCalculation ( size_t *  ref,
size_t *  hyp 
)

Definition at line 52 of file tercalc.cpp.


Member Data Documentation

Definition at line 53 of file tercalc.h.

Referenced by MinEditDist(), and terCalc().

Definition at line 56 of file tercalc.h.

Referenced by MinEditDist(), and terCalc().

Definition at line 52 of file tercalc.h.

Referenced by MinEditDist(), and terCalc().

Definition at line 55 of file tercalc.h.

Referenced by MinEditDist(), and terCalc().

Definition at line 51 of file tercalc.h.

Referenced by GatherAllPossShifts(), and terCalc().

Definition at line 54 of file tercalc.h.

Referenced by MinEditDist(), and terCalc().


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

Generated on Thu Jun 4 00:33:18 2015 for Moses by  doxygen 1.5.9