Rules Class Reference

#include <Rules.h>

Collaboration diagram for Rules:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Rules (const AlignedSentence &alignedSentence)
virtual ~Rules ()
void Extend (const Parameter &params)
void Consolidate (const Parameter &params)
std::string Debug () const
void Output (std::ostream &out, bool forward, const Parameter &params) const

Protected Member Functions

void Extend (const Rule &rule, const Parameter &params)
void Extend (const Rule &rule, const ConsistentPhrases::Coll &cps, const Parameter &params)
void Extend (const Rule &rule, const ConsistentPhrase &cp, const Parameter &params)
void CreateRules (const ConsistentPhrase &cp, const Parameter &params)
void CreateRule (const NonTerm &nonTerm, const Parameter &params)
void MergeRules (const Parameter &params)
void CalcFractionalCount ()

Protected Attributes

const AlignedSentencem_alignedSentence
std::set< Rule * > m_keepRules
std::set< Rule *, CompareRulesm_mergeRules


Detailed Description

Definition at line 46 of file Rules.h.


Constructor & Destructor Documentation

Rules::Rules ( const AlignedSentence alignedSentence  ) 

Definition at line 21 of file Rules.cpp.

Rules::~Rules (  )  [virtual]

Definition at line 26 of file Rules.cpp.

References m_keepRules, and Moses::RemoveAllInColl().

Here is the call graph for this function:


Member Function Documentation

void Rules::CalcFractionalCount (  )  [protected]

Definition at line 196 of file Rules.cpp.

References Rule::GetConsistentPhrase(), m_keepRules, and Rule::SetCount().

Referenced by Consolidate().

Here is the call graph for this function:

Here is the caller graph for this function:

void Rules::Consolidate ( const Parameter params  ) 

Definition at line 163 of file Rules.cpp.

References CalcFractionalCount(), Parameter::fractionalCounting, m_keepRules, MergeRules(), and Rule::SetCount().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void Rules::CreateRule ( const NonTerm nonTerm,
const Parameter params 
) [protected]

Definition at line 46 of file Rules.cpp.

References Rule::CanRecurse(), Rule::CreateProperties(), Rule::CreateTarget(), Extend(), Rule::IsValid(), m_alignedSentence, m_keepRules, and Rule::Prevalidate().

Referenced by CreateRules().

Here is the call graph for this function:

Here is the caller graph for this function:

void Rules::CreateRules ( const ConsistentPhrase cp,
const Parameter params 
) [protected]

Definition at line 31 of file Rules.cpp.

References CreateRule(), ConsistentPhrase::GetHieroNonTerm(), ConsistentPhrase::GetNonTerms(), and Parameter::hieroSourceLHS.

Referenced by Extend().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Rules::Debug (  )  const

Definition at line 139 of file Rules.cpp.

References Rule::Debug(), and m_keepRules.

Here is the call graph for this function:

void Rules::Extend ( const Rule rule,
const ConsistentPhrase cp,
const Parameter params 
) [protected]

void Rules::Extend ( const Rule rule,
const ConsistentPhrases::Coll cps,
const Parameter params 
) [protected]

Definition at line 106 of file Rules.cpp.

References Extend().

Here is the call graph for this function:

void Rules::Extend ( const Rule rule,
const Parameter params 
) [protected]

void Rules::Extend ( const Parameter params  ) 

Definition at line 67 of file Rules.cpp.

References CreateRules(), ConsistentPhrases::GetColl(), AlignedSentence::GetConsistentPhrases(), AlignedSentence::GetPhrase(), Moses::Input, and m_alignedSentence.

Referenced by CreateRule(), Extend(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void Rules::MergeRules ( const Parameter params  )  [protected]

Definition at line 178 of file Rules.cpp.

References Rule::GetCount(), m_keepRules, m_mergeRules, and Rule::SetCount().

Referenced by Consolidate().

Here is the call graph for this function:

Here is the caller graph for this function:

void Rules::Output ( std::ostream &  out,
bool  forward,
const Parameter params 
) const

Definition at line 153 of file Rules.cpp.

References m_mergeRules, and Rule::Output().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 58 of file Rules.h.

Referenced by CreateRule(), and Extend().

std::set<Rule*> Rules::m_keepRules [protected]

Definition at line 59 of file Rules.h.

Referenced by CalcFractionalCount(), Consolidate(), CreateRule(), Debug(), Extend(), MergeRules(), and ~Rules().

std::set<Rule*, CompareRules> Rules::m_mergeRules [protected]

Definition at line 60 of file Rules.h.

Referenced by MergeRules(), and Output().


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

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