MosesTraining::Syntax::GHKM::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 (int sourceSize, int targetSize, const Alignment &alignment)
 PhraseOrientation (int sourceSize, int targetSize, const Moses::AlignmentInfo &alignTerm, const Moses::AlignmentInfo &alignNonTerm)
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 44 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 49 of file PhraseOrientation.h.

Enumerator:
REO_DIR_L2R 
REO_DIR_R2L 
REO_DIR_BIDIR 

Definition at line 50 of file PhraseOrientation.h.

Enumerator:
REO_MODEL_TYPE_MSD 
REO_MODEL_TYPE_MSLR 
REO_MODEL_TYPE_MONO 

Definition at line 48 of file PhraseOrientation.h.


Constructor & Destructor Documentation

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

Definition at line 39 of file PhraseOrientation.cpp.

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

Definition at line 67 of file PhraseOrientation.cpp.

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

Here is the call graph for this function:


Member Function Documentation

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

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

Definition at line 263 of file PhraseOrientation.cpp.

Referenced by GetOrientationInfoString().

Here is the caller graph for this function:

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

Definition at line 235 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::Syntax::GHKM::PhraseOrientation::GetOrientationInfoString ( int  startF,
int  endF,
REO_DIR  direction = REO_DIR_BIDIR 
) const

Definition at line 213 of file PhraseOrientation.cpp.

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

Definition at line 380 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::Syntax::GHKM::PhraseOrientation::IncrementPriorCount ( REO_DIR  direction,
REO_CLASS  orient,
float  increment 
)

Definition at line 442 of file PhraseOrientation.cpp.

References REO_DIR_L2R, and REO_DIR_R2L.

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

Definition at line 353 of file PhraseOrientation.cpp.

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

Definition at line 358 of file PhraseOrientation.cpp.

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

Definition at line 388 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::Syntax::GHKM::PhraseOrientation::WritePriorCounts ( std::ostream &  out,
const REO_MODEL_TYPE  modelType = REO_MODEL_TYPE_MSLR 
) [static]

Definition at line 453 of file PhraseOrientation.cpp.

References GetOrientationString(), and REO_CLASS_UNKNOWN.

Referenced by MosesTraining::Syntax::GHKM::ExtractGHKM::Main().

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 Dec 10 00:34:55 2015 for Moses by  doxygen 1.5.9