#include <PhraseOrientation.h>
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) |
Definition at line 44 of file PhraseOrientation.h.
Definition at line 49 of file PhraseOrientation.h.
Definition at line 50 of file PhraseOrientation.h.
Definition at line 48 of file PhraseOrientation.h.
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().
PhraseOrientation::REO_CLASS MosesTraining::Syntax::GHKM::PhraseOrientation::GetOrientationInfo | ( | int | startF, | |
int | startE, | |||
int | endF, | |||
int | endE, | |||
REO_DIR | direction | |||
) | const |
Definition at line 285 of file PhraseOrientation.cpp.
References REO_CLASS_UNKNOWN, REO_DIR_L2R, REO_DIR_R2L, and REO_MODEL_TYPE_MSLR.
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().
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.
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().
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().
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().