#include <Word.h>
Public Member Functions | |
Word (const Word &) | |
Word (int pos, const std::string &str) | |
virtual | ~Word () |
virtual bool | IsNonTerm () const |
std::string | GetString () const |
std::string | GetString (int factor) const |
int | GetPos () const |
void | AddAlignment (const Word *other) |
const std::set< const Word * > & | GetAlignment () const |
std::set< int > | GetAlignmentIndex () const |
void | Output (std::ostream &out) const |
std::string | Debug () const |
int | CompareString (const Word &other) const |
Protected Attributes | |
int | m_pos |
std::string | m_str |
std::set< const Word * > | m_alignment |
Definition at line 14 of file Word.h.
Word::Word | ( | const Word & | ) |
void Word::AddAlignment | ( | const Word * | other | ) |
Definition at line 26 of file Word.cpp.
References m_alignment.
Referenced by AlignedSentence::PopulateAlignment().
int Word::CompareString | ( | const Word & | other | ) | const |
std::string Word::Debug | ( | ) | const [virtual] |
Implements RuleSymbol.
Definition at line 50 of file Word.cpp.
References m_str.
Referenced by Phrase::Debug().
const std::set<const Word *>& Word::GetAlignment | ( | ) | const [inline] |
Definition at line 37 of file Word.h.
References m_alignment.
Referenced by Rule::CreateAlignments(), and Rule::Prevalidate().
std::set< int > Word::GetAlignmentIndex | ( | ) | const |
Definition at line 31 of file Word.cpp.
References GetPos(), and m_alignment.
Referenced by AlignedSentence::CreateConsistentPhrases(), and AlignedSentence::GetSourceAlignmentCount().
int Word::GetPos | ( | ) | const [inline] |
Definition at line 31 of file Word.h.
References m_pos.
Referenced by GetAlignmentIndex().
std::string Word::GetString | ( | int | factor | ) | const |
Definition at line 60 of file Word.cpp.
References m_str, and Moses::Tokenize().
std::string Word::GetString | ( | ) | const [inline, virtual] |
Implements RuleSymbol.
Definition at line 25 of file Word.h.
References m_str.
Referenced by Rule::NonTermContextFactor().
virtual bool Word::IsNonTerm | ( | ) | const [inline, virtual] |
void Word::Output | ( | std::ostream & | out | ) | const [virtual] |
std::set<const Word *> Word::m_alignment [protected] |
Definition at line 51 of file Word.h.
Referenced by AddAlignment(), GetAlignment(), and GetAlignmentIndex().
int Word::m_pos [protected] |
std::string Word::m_str [protected] |
Definition at line 50 of file Word.h.
Referenced by CompareString(), Debug(), GetString(), and Output().