MosesTraining::ExtractionPhrasePair Class Reference

#include <ExtractionPhrasePair.h>

List of all members.

Public Member Functions

 ExtractionPhrasePair (const PHRASE *phraseSource, const PHRASE *phraseTarget, ALIGNMENT *targetToSourceAlignment, float count, float pcfgSum)
 ~ExtractionPhrasePair ()
bool Add (ALIGNMENT *targetToSourceAlignment, float count, float pcfgSum)
void IncrementPrevious (float count, float pcfgSum)
bool Matches (const PHRASE *otherPhraseSource, const PHRASE *otherPhraseTarget, ALIGNMENT *otherTargetToSourceAlignment) const
bool Matches (const PHRASE *otherPhraseSource, const PHRASE *otherPhraseTarget, ALIGNMENT *otherTargetToSourceAlignment, bool &sourceMatch, bool &targetMatch, bool &alignmentMatch) const
bool MatchesAlignment (ALIGNMENT *otherTargetToSourceAlignment) const
void Clear ()
bool IsValid () const
const PHRASEGetSource () const
const PHRASEGetTarget () const
float GetCount () const
float GetPcfgScore () const
const size_t GetNumberOfProperties () const
const std::map< std::string,
float > * 
GetProperty (const std::string &key) const
const ALIGNMENTFindBestAlignmentTargetToSource () const
const std::string * FindBestPropertyValue (const std::string &key) const
std::string CollectAllPropertyValues (const std::string &key) const
std::string CollectAllLabelsSeparateLHSAndRHS (const std::string &propertyKey, std::set< std::string > &sourceLabelSet, boost::unordered_map< std::string, float > &sourceLHSCounts, boost::unordered_map< std::string, boost::unordered_map< std::string, float > * > &sourceRHSAndLHSJointCounts, Vocabulary &vcbT) const
void CollectAllPhraseOrientations (const std::string &key, const std::vector< float > &orientationClassPriorsL2R, const std::vector< float > &orientationClassPriorsR2L, double smoothingFactor, std::ostream &out) const
void UpdateVocabularyFromValueTokens (const std::string &propertyKey, std::set< std::string > &vocabulary) const
void AddProperties (const std::string &str, float count)
void AddProperty (const std::string &key, const std::string &value, float count)

Protected Types

typedef std::map< std::string,
float > 
PROPERTY_VALUES
typedef std::map< std::string,
float >::iterator 
LAST_PROPERTY_VALUE

Protected Attributes

bool m_isValid
const PHRASEm_phraseSource
const PHRASEm_phraseTarget
float m_count
float m_pcfgSum
std::map< ALIGNMENT *, float > m_targetToSourceAlignments
std::map< std::string,
std::pair< PROPERTY_VALUES
*, LAST_PROPERTY_VALUE * > > 
m_properties
float m_lastCount
float m_lastPcfgSum
std::map< ALIGNMENT *, float >
::iterator 
m_lastTargetToSourceAlignment


Detailed Description

Definition at line 35 of file ExtractionPhrasePair.h.


Member Typedef Documentation

typedef std::map<std::string,float>::iterator MosesTraining::ExtractionPhrasePair::LAST_PROPERTY_VALUE [protected]

Definition at line 41 of file ExtractionPhrasePair.h.

typedef std::map<std::string,float> MosesTraining::ExtractionPhrasePair::PROPERTY_VALUES [protected]

Definition at line 40 of file ExtractionPhrasePair.h.


Constructor & Destructor Documentation

MosesTraining::ExtractionPhrasePair::ExtractionPhrasePair ( const PHRASE phraseSource,
const PHRASE phraseTarget,
ALIGNMENT targetToSourceAlignment,
float  count,
float  pcfgSum 
)

MosesTraining::ExtractionPhrasePair::~ExtractionPhrasePair (  ) 

Definition at line 66 of file ExtractionPhrasePair.cpp.

References Clear().

Here is the call graph for this function:


Member Function Documentation

bool MosesTraining::ExtractionPhrasePair::Add ( ALIGNMENT targetToSourceAlignment,
float  count,
float  pcfgSum 
)

Definition at line 74 of file ExtractionPhrasePair.cpp.

References m_count, m_lastCount, m_lastPcfgSum, m_lastTargetToSourceAlignment, m_pcfgSum, and m_targetToSourceAlignments.

Referenced by main().

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::AddProperties ( const std::string &  str,
float  count 
)

Definition at line 226 of file ExtractionPhrasePair.cpp.

References AddProperty(), Moses::TokenizeFirstOnly(), and Moses::TokenizeMultiCharSeparator().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::AddProperty ( const std::string &  key,
const std::string &  value,
float  count 
) [inline]

Definition at line 147 of file ExtractionPhrasePair.h.

References m_properties.

Referenced by AddProperties(), and MosesTraining::DomainFeature::addPropertiesToPhrasePair().

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::Clear (  ) 

std::string MosesTraining::ExtractionPhrasePair::CollectAllLabelsSeparateLHSAndRHS ( const std::string &  propertyKey,
std::set< std::string > &  sourceLabelSet,
boost::unordered_map< std::string, float > &  sourceLHSCounts,
boost::unordered_map< std::string, boost::unordered_map< std::string, float > * > &  sourceRHSAndLHSJointCounts,
Vocabulary vcbT 
) const

Definition at line 329 of file ExtractionPhrasePair.cpp.

References EOF, GetProperty(), MosesTraining::Vocabulary::getWord(), m_phraseTarget, and NULL.

Referenced by outputPhrasePair().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::CollectAllPhraseOrientations ( const std::string &  key,
const std::vector< float > &  orientationClassPriorsL2R,
const std::vector< float > &  orientationClassPriorsR2L,
double  smoothingFactor,
std::ostream &  out 
) const

Definition at line 471 of file ExtractionPhrasePair.cpp.

References EOF, GetProperty(), m_count, NULL, and UTIL_THROW.

Referenced by outputPhrasePair().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MosesTraining::ExtractionPhrasePair::CollectAllPropertyValues ( const std::string &  key  )  const

Definition at line 303 of file ExtractionPhrasePair.cpp.

References GetProperty(), and NULL.

Referenced by outputPhrasePair().

Here is the call graph for this function:

Here is the caller graph for this function:

const ALIGNMENT * MosesTraining::ExtractionPhrasePair::FindBestAlignmentTargetToSource (  )  const

Definition at line 250 of file ExtractionPhrasePair.cpp.

References m_targetToSourceAlignments, and NULL.

Referenced by outputPhrasePair().

Here is the caller graph for this function:

const std::string * MosesTraining::ExtractionPhrasePair::FindBestPropertyValue ( const std::string &  key  )  const

Definition at line 274 of file ExtractionPhrasePair.cpp.

References GetProperty(), and NULL.

Referenced by outputPhrasePair().

Here is the call graph for this function:

Here is the caller graph for this function:

float MosesTraining::ExtractionPhrasePair::GetCount (  )  const [inline]

Definition at line 102 of file ExtractionPhrasePair.h.

References m_count.

Referenced by MosesTraining::DomainFeature::add(), and outputPhrasePair().

Here is the caller graph for this function:

const size_t MosesTraining::ExtractionPhrasePair::GetNumberOfProperties (  )  const [inline]

Definition at line 110 of file ExtractionPhrasePair.h.

References m_properties.

float MosesTraining::ExtractionPhrasePair::GetPcfgScore (  )  const [inline]

Definition at line 106 of file ExtractionPhrasePair.h.

References m_pcfgSum.

Referenced by outputPhrasePair().

Here is the caller graph for this function:

const std::map<std::string,float>* MosesTraining::ExtractionPhrasePair::GetProperty ( const std::string &  key  )  const [inline]

const PHRASE* MosesTraining::ExtractionPhrasePair::GetSource (  )  const [inline]

Definition at line 94 of file ExtractionPhrasePair.h.

References m_phraseSource.

Referenced by outputPhrasePair().

Here is the caller graph for this function:

const PHRASE* MosesTraining::ExtractionPhrasePair::GetTarget (  )  const [inline]

Definition at line 98 of file ExtractionPhrasePair.h.

References m_phraseTarget.

Referenced by outputPhrasePair().

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::IncrementPrevious ( float  count,
float  pcfgSum 
)

Definition at line 102 of file ExtractionPhrasePair.cpp.

References m_count, m_lastCount, m_lastPcfgSum, m_lastTargetToSourceAlignment, m_pcfgSum, and m_properties.

Referenced by main().

Here is the caller graph for this function:

bool MosesTraining::ExtractionPhrasePair::IsValid (  )  const [inline]

Definition at line 89 of file ExtractionPhrasePair.h.

References m_isValid.

Referenced by outputPhrasePair().

Here is the caller graph for this function:

bool MosesTraining::ExtractionPhrasePair::Matches ( const PHRASE otherPhraseSource,
const PHRASE otherPhraseTarget,
ALIGNMENT otherTargetToSourceAlignment,
bool &  sourceMatch,
bool &  targetMatch,
bool &  alignmentMatch 
) const

Definition at line 140 of file ExtractionPhrasePair.cpp.

References m_phraseSource, m_phraseTarget, and MatchesAlignment().

Here is the call graph for this function:

bool MosesTraining::ExtractionPhrasePair::Matches ( const PHRASE otherPhraseSource,
const PHRASE otherPhraseTarget,
ALIGNMENT otherTargetToSourceAlignment 
) const

Definition at line 121 of file ExtractionPhrasePair.cpp.

References m_phraseSource, m_phraseTarget, and MatchesAlignment().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool MosesTraining::ExtractionPhrasePair::MatchesAlignment ( ALIGNMENT otherTargetToSourceAlignment  )  const

Definition at line 170 of file ExtractionPhrasePair.cpp.

References MosesTraining::Vocabulary::getWord(), MosesTraining::hierarchicalFlag, MosesTraining::isNonTerminal(), m_phraseTarget, m_targetToSourceAlignments, and MosesTraining::vcbT.

Referenced by Matches().

Here is the call graph for this function:

Here is the caller graph for this function:

void MosesTraining::ExtractionPhrasePair::UpdateVocabularyFromValueTokens ( const std::string &  propertyKey,
std::set< std::string > &  vocabulary 
) const

Definition at line 561 of file ExtractionPhrasePair.cpp.

References GetProperty(), NULL, and MosesTraining::Tokenize().

Referenced by outputPhrasePair().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 44 of file ExtractionPhrasePair.h.

Referenced by Clear(), ExtractionPhrasePair(), and IsValid().

Definition at line 56 of file ExtractionPhrasePair.h.

Referenced by Add(), Clear(), ExtractionPhrasePair(), and IncrementPrevious().

Definition at line 57 of file ExtractionPhrasePair.h.

Referenced by Add(), Clear(), ExtractionPhrasePair(), and IncrementPrevious().

Definition at line 58 of file ExtractionPhrasePair.h.

Referenced by Add(), Clear(), ExtractionPhrasePair(), and IncrementPrevious().

Definition at line 46 of file ExtractionPhrasePair.h.

Referenced by Clear(), GetSource(), and Matches().

std::map<std::string, std::pair< PROPERTY_VALUES*, LAST_PROPERTY_VALUE* > > MosesTraining::ExtractionPhrasePair::m_properties [protected]


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

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