#include <SpanLengthPhraseProperty.h>
Public Member Functions | |
SpanLengthPhraseProperty () | |
void | ProcessValue (const std::string &value) |
float | GetProb (size_t ntInd, size_t sourceWidth, float smoothing) const |
Protected Types | |
typedef std::map< size_t, float > | Map |
typedef std::vector< std::pair < Map, float > > | Vec |
Protected Member Functions | |
void | Populate (const std::set< std::vector< std::string > > &indices, float count) |
void | Populate (const std::vector< size_t > &toks, float count) |
void | Populate (Map &map, size_t span, float count) |
void | CalcTotals (Vec &vec) |
Protected Attributes | |
Vec | m_source |
Vec | m_target |
Definition at line 13 of file SpanLengthPhraseProperty.h.
typedef std::map<size_t, float> Moses::SpanLengthPhraseProperty::Map [protected] |
Definition at line 23 of file SpanLengthPhraseProperty.h.
typedef std::vector<std::pair<Map, float> > Moses::SpanLengthPhraseProperty::Vec [protected] |
Definition at line 24 of file SpanLengthPhraseProperty.h.
Moses::SpanLengthPhraseProperty::SpanLengthPhraseProperty | ( | ) |
Definition at line 9 of file SpanLengthPhraseProperty.cpp.
void Moses::SpanLengthPhraseProperty::CalcTotals | ( | Vec & | vec | ) | [protected] |
Definition at line 83 of file SpanLengthPhraseProperty.cpp.
Referenced by ProcessValue().
float Moses::SpanLengthPhraseProperty::GetProb | ( | size_t | ntInd, | |
size_t | sourceWidth, | |||
float | smoothing | |||
) | const |
Definition at line 99 of file SpanLengthPhraseProperty.cpp.
References m_source.
Referenced by Moses::SpanLength::EvaluateWithSourceContext().
void Moses::SpanLengthPhraseProperty::Populate | ( | Map & | map, | |
size_t | span, | |||
float | count | |||
) | [protected] |
Definition at line 71 of file SpanLengthPhraseProperty.cpp.
void Moses::SpanLengthPhraseProperty::Populate | ( | const std::vector< size_t > & | toks, | |
float | count | |||
) | [protected] |
Definition at line 55 of file SpanLengthPhraseProperty.cpp.
References m_source, m_target, and Populate().
void Moses::SpanLengthPhraseProperty::Populate | ( | const std::set< std::vector< std::string > > & | indices, | |
float | count | |||
) | [protected] |
void Moses::SpanLengthPhraseProperty::ProcessValue | ( | const std::string & | value | ) | [virtual] |
Reimplemented from Moses::PhraseProperty.
Definition at line 13 of file SpanLengthPhraseProperty.cpp.
References CalcTotals(), count, m_source, m_target, Populate(), Moses::Tokenize(), and UTIL_THROW_IF2.
Vec Moses::SpanLengthPhraseProperty::m_source [protected] |
Definition at line 25 of file SpanLengthPhraseProperty.h.
Referenced by GetProb(), Populate(), and ProcessValue().
Vec Moses::SpanLengthPhraseProperty::m_target [protected] |
Definition at line 25 of file SpanLengthPhraseProperty.h.
Referenced by Populate(), and ProcessValue().