#include <LRModel.h>
Public Types | |
enum | ModelType { Monotonic, MSD, MSLR, LeftRight, None } |
enum | Direction { Forward, Backward, Bidirectional } |
enum | Condition { F, E, FE } |
enum | ReorderingType { M = 0, NM = 1, S = 1, D = 2, DL = 2, DR = 3, R = 0, L = 1, MAX = 3, NONE = 4 } |
Public Member Functions | |
ReorderingType | GetOrientation (Range const &cur) const |
return orientation for the first phrase | |
ReorderingType | GetOrientation (Range const &prev, Range const &cur) const |
ReorderingType | GetOrientation (Range const &prev, Range const &cur, Bitmap const &cov) const |
ReorderingType | GetOrientation (int const reoDistance) const |
LRModel (const std::string &modelType) | |
void | ConfigureSparse (const std::map< std::string, std::string > &sparseArgs, const LexicalReordering *producer) |
LRState * | CreateLRState (const InputType &input) const |
size_t | GetNumberOfTypes () const |
size_t | GetNumScoreComponents () const |
void | SetAdditionalScoreComponents (size_t number) |
LexicalReordering * | GetScoreProducer () const |
ModelType | GetModelType () const |
Direction | GetDirection () const |
Condition | GetCondition () const |
bool | IsPhraseBased () const |
bool | CollapseScores () const |
SparseReordering const * | GetSparseReordering () const |
Friends | |
class | LexicalReordering |
Definition at line 16 of file LRModel.h.
Moses::LRModel::LRModel | ( | const std::string & | modelType | ) |
bool Moses::LRModel::CollapseScores | ( | ) | const [inline] |
Definition at line 101 of file LRModel.h.
Referenced by Moses::LRState::CopyScores().
void Moses::LRModel::ConfigureSparse | ( | const std::map< std::string, std::string > & | sparseArgs, | |
const LexicalReordering * | producer | |||
) |
Definition at line 52 of file LRModel.cpp.
Definition at line 193 of file LRModel.cpp.
References Backward, Bidirectional, Forward, GetNumberOfTypes(), Moses::InputType::GetSize(), and NULL.
Direction Moses::LRModel::GetDirection | ( | ) | const [inline] |
Definition at line 88 of file LRModel.h.
Referenced by sapt::PhrasePair< Token >::print().
ModelType Moses::LRModel::GetModelType | ( | ) | const [inline] |
Definition at line 85 of file LRModel.h.
Referenced by sapt::PhrasePair< Token >::print().
size_t Moses::LRModel::GetNumberOfTypes | ( | ) | const |
Definition at line 34 of file LRModel.cpp.
Referenced by Moses::LRState::ComparePrevScores(), CreateLRState(), and GetNumScoreComponents().
size_t Moses::LRModel::GetNumScoreComponents | ( | ) | const |
Definition at line 42 of file LRModel.cpp.
References Bidirectional, and GetNumberOfTypes().
LRModel::ReorderingType Moses::LRModel::GetOrientation | ( | int const | reoDistance | ) | const |
LRModel::ReorderingType Moses::LRModel::GetOrientation | ( | Range const & | prev, | |
Range const & | cur, | |||
Bitmap const & | cov | |||
) | const |
Definition at line 109 of file LRModel.cpp.
References D, DL, DR, Moses::Range::GetEndPos(), Moses::Range::GetStartPos(), Moses::IsMonotonicStep(), Moses::IsSwap(), L, LeftRight, M, Monotonic, MSD, NM, R, and S.
LRModel::ReorderingType Moses::LRModel::GetOrientation | ( | Range const & | prev, | |
Range const & | cur | |||
) | const |
Definition at line 81 of file LRModel.cpp.
References D, DL, DR, Moses::Range::GetEndPos(), Moses::Range::GetStartPos(), L, LeftRight, M, Monotonic, MSD, NM, None, R, S, and UTIL_THROW_IF2.
LRModel::ReorderingType Moses::LRModel::GetOrientation | ( | Range const & | cur | ) | const |
return orientation for the first phrase
Definition at line 70 of file LRModel.cpp.
References D, DR, Moses::Range::GetStartPos(), LeftRight, M, MSD, MSLR, NM, None, R, and UTIL_THROW_IF2.
Referenced by Moses::PhraseBasedReorderingState::Expand(), Moses::HReorderingForwardState::Expand(), and Moses::HReorderingBackwardState::Expand().
LexicalReordering* Moses::LRModel::GetScoreProducer | ( | ) | const [inline] |
Definition at line 81 of file LRModel.h.
Referenced by Moses::LRState::ComparePrevScores(), and Moses::LRState::CopyScores().
SparseReordering const* Moses::LRModel::GetSparseReordering | ( | ) | const [inline] |
Definition at line 106 of file LRModel.h.
Referenced by Moses::LRState::CopyScores().
void Moses::LRModel::SetAdditionalScoreComponents | ( | size_t | number | ) |
Definition at line 62 of file LRModel.cpp.
friend class LexicalReordering [friend] |