#include <FactorCollection.h>

Classes | |
| struct | EqualsFactor |
| struct | HashFactor |
Public Member Functions | |
| ~FactorCollection () | |
| const Factor * | AddFactor (const StringPiece &factorString) |
| const Factor * | AddFactor (FactorDirection, FactorType, const StringPiece &factorString) |
| TO_STRING () | |
Static Public Member Functions | |
| static FactorCollection & | Instance () |
Friends | |
| std::ostream & | operator<< (std::ostream &, const FactorCollection &) |
All Factors in moses are accessed and created by a FactorCollection. By enforcing this strict creation processes (ie, forbidding factors from being created on the stack, etc), their memory addresses can be used as keys to uniquely identify them. Only 1 FactorCollection object should be created.
Definition at line 60 of file FactorCollection.h.
| Moses::FactorCollection::~FactorCollection | ( | ) |
Definition at line 69 of file FactorCollection.cpp.
| const Factor* Moses::FactorCollection::AddFactor | ( | FactorDirection | , | |
| FactorType | , | |||
| const StringPiece & | factorString | |||
| ) | [inline] |
Definition at line 112 of file FactorCollection.h.
References AddFactor().

| const Factor * Moses::FactorCollection::AddFactor | ( | const StringPiece & | factorString | ) |
returns a factor with the same direction, factorType and factorString. If a factor already exist in the collection, return the existing factor, if not create a new 1
Definition at line 34 of file FactorCollection.cpp.
References StringPiece::data(), Moses::FactorFriend::in, and StringPiece::size().
Referenced by AddFactor(), Moses::LanguageModelSRI::CreateFactors(), Moses::LanguageModelORLM::CreateFactors(), Moses::LanguageModelIRST::CreateFactors(), Moses::Word::CreateFromString(), Moses::Phrase::CreateFromString(), Moses::PDTAimp::CreateTargetPhrase(), Moses::Word::CreateUnknownWord(), Moses::LanguageModelJoint::GetValueForgotState(), Moses::LanguageModelJoint::Load(), Moses::LanguageModelDMapLM::Load(), Moses::GenerationDictionary::Load(), Moses::StaticData::LoadNonTerminals(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), and Moses::ConfusionNet::String2Word().


| static FactorCollection& Moses::FactorCollection::Instance | ( | ) | [inline, static] |
Definition at line 100 of file FactorCollection.h.
Referenced by Moses::LanguageModelSRI::CreateFactors(), Moses::LanguageModelORLM::CreateFactors(), Moses::Word::CreateFromString(), Moses::Phrase::CreateFromString(), Moses::PDTAimp::CreateTargetPhrase(), Moses::Word::CreateUnknownWord(), Moses::LanguageModelJoint::GetValueForgotState(), Moses::LanguageModelJoint::Load(), Moses::LanguageModelIRST::Load(), Moses::LanguageModelDMapLM::Load(), Moses::GenerationDictionary::Load(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), and Moses::ConfusionNet::String2Word().

| Moses::FactorCollection::TO_STRING | ( | ) |
| std::ostream& operator<< | ( | std::ostream & | , | |
| const FactorCollection & | ||||
| ) | [friend] |
1.5.9