#include <AlignedSentence.h>
Public Member Functions | |
AlignedSentence (int lineNum) | |
AlignedSentence (int lineNum, const std::string &source, const std::string &target, const std::string &alignment) | |
virtual | ~AlignedSentence () |
virtual void | Create (const Parameter ¶ms) |
const Phrase & | GetPhrase (Moses::FactorDirection direction) const |
const ConsistentPhrases & | GetConsistentPhrases () const |
virtual std::string | Debug () const |
Public Attributes | |
int | m_lineNum |
Protected Member Functions | |
void | CreateConsistentPhrases (const Parameter ¶ms) |
void | PopulateWordVec (Phrase &vec, const std::string &line) |
void | PopulateAlignment (const std::string &line) |
std::vector< int > | GetSourceAlignmentCount () const |
Protected Attributes | |
Phrase | m_source |
Phrase | m_target |
ConsistentPhrases | m_consistentPhrases |
Definition at line 17 of file AlignedSentence.h.
AlignedSentence::AlignedSentence | ( | int | lineNum | ) | [inline] |
Definition at line 20 of file AlignedSentence.h.
AlignedSentence::AlignedSentence | ( | int | lineNum, | |
const std::string & | source, | |||
const std::string & | target, | |||
const std::string & | alignment | |||
) |
Definition at line 17 of file AlignedSentence.cpp.
References m_source, m_target, PopulateAlignment(), and PopulateWordVec().
AlignedSentence::~AlignedSentence | ( | ) | [virtual] |
Definition at line 28 of file AlignedSentence.cpp.
References m_source, m_target, and Moses::RemoveAllInColl().
void AlignedSentence::Create | ( | const Parameter & | params | ) | [virtual] |
Reimplemented in AlignedSentenceSyntax.
Definition at line 108 of file AlignedSentence.cpp.
References ConsistentPhrases::AddHieroNonTerms(), CreateConsistentPhrases(), and m_consistentPhrases.
Referenced by main().
void AlignedSentence::CreateConsistentPhrases | ( | const Parameter & | params | ) | [protected] |
Definition at line 114 of file AlignedSentence.cpp.
References ConsistentPhrases::Add(), Word::GetAlignmentIndex(), GetSourceAlignmentCount(), ConsistentPhrases::Initialize(), m_consistentPhrases, m_source, m_target, Parameter::maxSpan, and Parameter::minSpan.
Referenced by AlignedSentenceSyntax::Create(), and Create().
std::string AlignedSentence::Debug | ( | ) | const [virtual] |
Definition at line 75 of file AlignedSentence.cpp.
References ConsistentPhrases::Debug(), Phrase::Debug(), m_consistentPhrases, m_lineNum, m_source, and m_target.
Referenced by PopulateAlignment().
const ConsistentPhrases& AlignedSentence::GetConsistentPhrases | ( | ) | const [inline] |
Definition at line 35 of file AlignedSentence.h.
References m_consistentPhrases.
Referenced by Rules::Extend().
const Phrase& AlignedSentence::GetPhrase | ( | Moses::FactorDirection | direction | ) | const [inline] |
Definition at line 31 of file AlignedSentence.h.
References Moses::Input, m_source, and m_target.
Referenced by Rule::ContainTerm(), Rule::CreateSource(), Rule::CreateTarget(), Rules::Extend(), and Rule::NonTermContext().
std::vector< int > AlignedSentence::GetSourceAlignmentCount | ( | ) | const [protected] |
Definition at line 97 of file AlignedSentence.cpp.
References Word::GetAlignmentIndex(), and m_source.
Referenced by CreateConsistentPhrases().
void AlignedSentence::PopulateAlignment | ( | const std::string & | line | ) | [protected] |
Definition at line 47 of file AlignedSentence.cpp.
References Word::AddAlignment(), Debug(), m_source, m_target, and Moses::Tokenize().
Referenced by AlignedSentence(), and AlignedSentenceSyntax::Create().
void AlignedSentence::PopulateWordVec | ( | Phrase & | vec, | |
const std::string & | line | |||
) | [protected] |
Definition at line 34 of file AlignedSentence.cpp.
References Moses::Tokenize().
Referenced by AlignedSentence().
Definition at line 44 of file AlignedSentence.h.
Referenced by Create(), CreateConsistentPhrases(), AlignedSentenceSyntax::CreateNonTerms(), Debug(), and GetConsistentPhrases().
Phrase AlignedSentence::m_source [protected] |
Definition at line 43 of file AlignedSentence.h.
Referenced by AlignedSentence(), AlignedSentenceSyntax::Create(), CreateConsistentPhrases(), AlignedSentenceSyntax::CreateNonTerms(), Debug(), GetPhrase(), GetSourceAlignmentCount(), PopulateAlignment(), and ~AlignedSentence().
Phrase AlignedSentence::m_target [protected] |
Definition at line 43 of file AlignedSentence.h.
Referenced by AlignedSentence(), AlignedSentenceSyntax::Create(), CreateConsistentPhrases(), Debug(), GetPhrase(), PopulateAlignment(), and ~AlignedSentence().