MosesTraining::PhraseOrientation Class Reference

#include <PhraseOrientation.h>

List of all members.

Public Types

enum  REO_MODEL_TYPE { REO_MODEL_TYPE_MSD, REO_MODEL_TYPE_MSLR, REO_MODEL_TYPE_MONO }
enum  REO_CLASS {
  REO_CLASS_LEFT, REO_CLASS_RIGHT, REO_CLASS_DLEFT, REO_CLASS_DRIGHT,
  REO_CLASS_UNKNOWN
}
enum  REO_DIR { REO_DIR_L2R, REO_DIR_R2L, REO_DIR_BIDIR }

Public Member Functions

 PhraseOrientation ()
 PhraseOrientation (int sourceSize, int targetSize, const Alignment &alignment)
 PhraseOrientation (int sourceSize, int targetSize, const Moses::AlignmentInfo &alignTerm, const Moses::AlignmentInfo &alignNonTerm)
 PhraseOrientation (int sourceSize, int targetSize, const std::vector< std::vector< int > > &alignedToT, const std::vector< std::vector< int > > &alignedToS, const std::vector< int > &alignedCountS)
REO_CLASS GetOrientationInfo (int startF, int endF, REO_DIR direction) const
REO_CLASS GetOrientationInfo (int startF, int startE, int endF, int endE, REO_DIR direction) const
const std::string GetOrientationInfoString (int startF, int endF, REO_DIR direction=REO_DIR_BIDIR) const
const std::string GetOrientationInfoString (int startF, int startE, int endF, int endE, REO_DIR direction=REO_DIR_BIDIR) const
void IncrementPriorCount (REO_DIR direction, REO_CLASS orient, float increment)
bool SourceSpanIsAligned (int index1, int index2) const
bool TargetSpanIsAligned (int index1, int index2) const

Static Public Member Functions

static const std::string GetOrientationString (const REO_CLASS orient, const REO_MODEL_TYPE modelType=REO_MODEL_TYPE_MSLR)
static void WriteOrientation (std::ostream &out, const REO_CLASS orient, const REO_MODEL_TYPE modelType=REO_MODEL_TYPE_MSLR)
static void WritePriorCounts (std::ostream &out, const REO_MODEL_TYPE modelType=REO_MODEL_TYPE_MSLR)


Detailed Description

Definition at line 40 of file PhraseOrientation.h.


Member Enumeration Documentation

Enumerator:
REO_CLASS_LEFT 
REO_CLASS_RIGHT 
REO_CLASS_DLEFT 
REO_CLASS_DRIGHT 
REO_CLASS_UNKNOWN 

Definition at line 45 of file PhraseOrientation.h.

Enumerator:
REO_DIR_L2R 
REO_DIR_R2L 
REO_DIR_BIDIR 

Definition at line 46 of file PhraseOrientation.h.

Enumerator:
REO_MODEL_TYPE_MSD 
REO_MODEL_TYPE_MSLR 
REO_MODEL_TYPE_MONO 

Definition at line 44 of file PhraseOrientation.h.


Constructor & Destructor Documentation

MosesTraining::PhraseOrientation::PhraseOrientation (  )  [inline]

Definition at line 48 of file PhraseOrientation.h.

MosesTraining::PhraseOrientation::PhraseOrientation ( int  sourceSize,
int  targetSize,
const Alignment alignment 
)

Definition at line 35 of file PhraseOrientation.cpp.

MosesTraining::PhraseOrientation::PhraseOrientation ( int  sourceSize,
int  targetSize,
const Moses::AlignmentInfo alignTerm,
const Moses::AlignmentInfo alignNonTerm 
)

Definition at line 63 of file PhraseOrientation.cpp.

References Moses::AlignmentInfo::begin(), and Moses::AlignmentInfo::end().

Here is the call graph for this function:

MosesTraining::PhraseOrientation::PhraseOrientation ( int  sourceSize,
int  targetSize,
const std::vector< std::vector< int > > &  alignedToT,
const std::vector< std::vector< int > > &  alignedToS,
const std::vector< int > &  alignedCountS 
)

Definition at line 99 of file PhraseOrientation.cpp.


Member Function Documentation

PhraseOrientation::REO_CLASS MosesTraining::PhraseOrientation::GetOrientationInfo ( int  startF,
int  startE,
int  endF,
int  endE,
REO_DIR  direction 
) const

PhraseOrientation::REO_CLASS MosesTraining::PhraseOrientation::GetOrientationInfo ( int  startF,
int  endF,
REO_DIR  direction 
) const

Definition at line 271 of file PhraseOrientation.cpp.

Referenced by GetOrientationInfoString().

Here is the caller graph for this function:

const std::string MosesTraining::PhraseOrientation::GetOrientationInfoString ( int  startF,
int  startE,
int  endF,
int  endE,
REO_DIR  direction = REO_DIR_BIDIR 
) const

Definition at line 243 of file PhraseOrientation.cpp.

References GetOrientationInfo(), GetOrientationString(), REO_CLASS_UNKNOWN, REO_DIR_BIDIR, REO_DIR_L2R, REO_DIR_R2L, and REO_MODEL_TYPE_MSLR.

Here is the call graph for this function:

const std::string MosesTraining::PhraseOrientation::GetOrientationInfoString ( int  startF,
int  endF,
REO_DIR  direction = REO_DIR_BIDIR 
) const

Definition at line 221 of file PhraseOrientation.cpp.

const std::string MosesTraining::PhraseOrientation::GetOrientationString ( const REO_CLASS  orient,
const REO_MODEL_TYPE  modelType = REO_MODEL_TYPE_MSLR 
) [static]

Definition at line 388 of file PhraseOrientation.cpp.

References WriteOrientation().

Referenced by GetOrientationInfoString(), and WritePriorCounts().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTraining::PhraseOrientation::IncrementPriorCount ( REO_DIR  direction,
REO_CLASS  orient,
float  increment 
)

Definition at line 450 of file PhraseOrientation.cpp.

References REO_DIR_L2R, and REO_DIR_R2L.

bool MosesTraining::PhraseOrientation::SourceSpanIsAligned ( int  index1,
int  index2 
) const

Definition at line 361 of file PhraseOrientation.cpp.

bool MosesTraining::PhraseOrientation::TargetSpanIsAligned ( int  index1,
int  index2 
) const

Definition at line 366 of file PhraseOrientation.cpp.

void MosesTraining::PhraseOrientation::WriteOrientation ( std::ostream &  out,
const REO_CLASS  orient,
const REO_MODEL_TYPE  modelType = REO_MODEL_TYPE_MSLR 
) [static]

Definition at line 396 of file PhraseOrientation.cpp.

References REO_CLASS_DLEFT, REO_CLASS_DRIGHT, REO_CLASS_LEFT, REO_CLASS_RIGHT, REO_CLASS_UNKNOWN, REO_MODEL_TYPE_MONO, REO_MODEL_TYPE_MSD, and REO_MODEL_TYPE_MSLR.

Referenced by GetOrientationString().

Here is the caller graph for this function:

void MosesTraining::PhraseOrientation::WritePriorCounts ( std::ostream &  out,
const REO_MODEL_TYPE  modelType = REO_MODEL_TYPE_MSLR 
) [static]

Definition at line 461 of file PhraseOrientation.cpp.

References GetOrientationString(), and REO_CLASS_UNKNOWN.

Referenced by MosesTraining::Syntax::GHKM::ExtractGHKM::Main(), and writePhraseOrientationPriors().

Here is the call graph for this function:

Here is the caller graph for this function:


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

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