Moses::LRModel Class Reference

Factory class for lexical reordering states. More...

#include <LRModel.h>

Collaboration diagram for Moses::LRModel:

Collaboration graph
[legend]

List of all members.

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)
LRStateCreateLRState (const InputType &input) const
size_t GetNumberOfTypes () const
size_t GetNumScoreComponents () const
void SetAdditionalScoreComponents (size_t number)
LexicalReorderingGetScoreProducer () const
ModelType GetModelType () const
Direction GetDirection () const
Condition GetCondition () const
bool IsPhraseBased () const
bool CollapseScores () const
SparseReordering const * GetSparseReordering () const

Friends

class LexicalReordering


Detailed Description

Factory class for lexical reordering states.

Definition at line 16 of file LRModel.h.


Member Enumeration Documentation

Enumerator:
F 
E 
FE 

Definition at line 22 of file LRModel.h.

Enumerator:
Forward 
Backward 
Bidirectional 

Definition at line 21 of file LRModel.h.

Enumerator:
Monotonic 
MSD 
MSLR 
LeftRight 
None 

Definition at line 20 of file LRModel.h.

Enumerator:
M 
NM 
S 
D 
DL 
DR 
R 
L 
MAX 
NONE 

Definition at line 38 of file LRModel.h.


Constructor & Destructor Documentation

Moses::LRModel::LRModel ( const std::string &  modelType  ) 

Definition at line 122 of file LRModel.cpp.

References Backward, Bidirectional, F, FE, Forward, LeftRight, Monotonic, MSD, MSLR, and None.


Member Function Documentation

bool Moses::LRModel::CollapseScores (  )  const [inline]

Definition at line 101 of file LRModel.h.

Referenced by Moses::LRState::CopyScores().

Here is the caller graph for this function:

void Moses::LRModel::ConfigureSparse ( const std::map< std::string, std::string > &  sparseArgs,
const LexicalReordering producer 
)

Definition at line 52 of file LRModel.cpp.

LRState * Moses::LRModel::CreateLRState ( const InputType input  )  const

Definition at line 193 of file LRModel.cpp.

References Backward, Bidirectional, Forward, GetNumberOfTypes(), Moses::InputType::GetSize(), and NULL.

Here is the call graph for this function:

Condition Moses::LRModel::GetCondition (  )  const [inline]

Definition at line 91 of file LRModel.h.

Direction Moses::LRModel::GetDirection (  )  const [inline]

Definition at line 88 of file LRModel.h.

Referenced by sapt::PhrasePair< Token >::print().

Here is the caller graph for this function:

ModelType Moses::LRModel::GetModelType (  )  const [inline]

Definition at line 85 of file LRModel.h.

Referenced by sapt::PhrasePair< Token >::print().

Here is the caller graph for this function:

size_t Moses::LRModel::GetNumberOfTypes (  )  const

Definition at line 34 of file LRModel.cpp.

References MSD, and MSLR.

Referenced by Moses::LRState::ComparePrevScores(), CreateLRState(), and GetNumScoreComponents().

Here is the caller graph for this function:

size_t Moses::LRModel::GetNumScoreComponents (  )  const

Definition at line 42 of file LRModel.cpp.

References Bidirectional, and GetNumberOfTypes().

Here is the call graph for this function:

LRModel::ReorderingType Moses::LRModel::GetOrientation ( int const   reoDistance  )  const

Definition at line 95 of file LRModel.cpp.

References D, DL, DR, L, LeftRight, M, Monotonic, MSD, NM, R, and S.

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

LexicalReordering* Moses::LRModel::GetScoreProducer (  )  const [inline]

Definition at line 81 of file LRModel.h.

Referenced by Moses::LRState::ComparePrevScores(), and Moses::LRState::CopyScores().

Here is the caller graph for this function:

SparseReordering const* Moses::LRModel::GetSparseReordering (  )  const [inline]

Definition at line 106 of file LRModel.h.

Referenced by Moses::LRState::CopyScores().

Here is the caller graph for this function:

bool Moses::LRModel::IsPhraseBased (  )  const [inline]

Definition at line 96 of file LRModel.h.

void Moses::LRModel::SetAdditionalScoreComponents ( size_t  number  ) 

Definition at line 62 of file LRModel.cpp.


Friends And Related Function Documentation

friend class LexicalReordering [friend]

Definition at line 19 of file LRModel.h.


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

Generated on Thu Jul 6 00:33:06 2017 for Moses by  doxygen 1.5.9