Moses::ScoreComponentCollection Class Reference

#include <ScoreComponentCollection.h>

Collaboration diagram for Moses::ScoreComponentCollection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScoreComponentCollection ()
 Create a new score collection with all values set to 0.0.
 ScoreComponentCollection (const ScoreComponentCollection &rhs)
 Clone a score collection.
ScoreComponentCollectionoperator= (const ScoreComponentCollection &rhs)
bool Load (const std::string &filename)
const FVectorGetScoresVector () const
const std::valarray< FValue > & getCoreFeatures () const
size_t Size () const
void Resize ()
void SetToBinaryOf (const ScoreComponentCollection &rhs)
void ZeroAll ()
 Set all values to 0.0.
void MultiplyEquals (float scalar)
void DivideEquals (float scalar)
void CoreDivideEquals (float scalar)
void DivideEquals (const ScoreComponentCollection &rhs)
void MultiplyEquals (const ScoreComponentCollection &rhs)
void MultiplyEqualsBackoff (const ScoreComponentCollection &rhs, float backoff)
void MultiplyEquals (float core_r0, float sparse_r0)
void MultiplyEquals (const FeatureFunction *sp, float scalar)
size_t GetNumberWeights (const FeatureFunction *sp)
void CoreAssign (const ScoreComponentCollection &rhs)
void PlusEquals (const ScoreComponentCollection &rhs)
 add the score in rhs
void SparsePlusEquals (const ScoreComponentCollection &rhs)
void CorePlusEquals (const ScoreComponentCollection &rhs)
void PlusEquals (const FVector &scores)
void MinusEquals (const ScoreComponentCollection &rhs)
 subtract the score in rhs
void MinusEquals (const FeatureFunction *sp, const std::string &name, float score)
void SparseMinusEquals (const std::string &full_name, float score)
void PlusEquals (const FeatureFunction *sp, const ScoreComponentCollection &scores)
void PlusEquals (const FeatureFunction *sp, const std::vector< float > &scores)
void PlusEquals (const FeatureFunction *sp, float scores[])
void PlusEquals (const FeatureFunction *sp, float score)
void PlusEquals (const FeatureFunction *sp, const StringPiece &name, float score)
void PlusEquals (const FeatureFunction *sp, const ScorePair &scorePair)
void PlusEquals (size_t index, float score)
void SparsePlusEquals (const std::string &full_name, float score)
void SparsePlusEquals (const FName &fname, float score)
void Assign (const FeatureFunction *sp, const std::vector< float > &scores)
void Assign (const FeatureFunction *sp, float score)
void Assign (size_t index, float score)
void Assign (const FeatureFunction *sp, const StringPiece &name, float score)
void Assign (const FeatureFunction *sp, const std::string &line)
void Assign (const std::string name, float score)
float InnerProduct (const ScoreComponentCollection &rhs) const
float PartialInnerProduct (const FeatureFunction *sp, const std::vector< float > &rhs) const
std::vector< float > GetScoresForProducer (const FeatureFunction *sp) const
 return a vector of all the scores associated with a certain FeatureFunction
FVector GetVectorForProducer (const FeatureFunction *sp) const
 get subset of scores that belong to a certain sparse ScoreProducer
float GetSparseWeight (const FName &featureName) const
void PrintCoreFeatures ()
void ThresholdScaling (float maxValue)
void CapMax (float maxValue)
void CapMin (float minValue)
float GetScoreForProducer (const FeatureFunction *sp) const
float GetScoreForProducer (const FeatureFunction *sp, const std::string &name) const
float GetWeightedScore () const
void ZeroDenseFeatures (const FeatureFunction *sp)
void InvertDenseFeatures (const FeatureFunction *sp)
void L1Normalise ()
float GetL1Norm () const
float GetL2Norm () const
float GetLInfNorm () const
size_t L1Regularize (float lambda)
void L2Regularize (float lambda)
size_t SparseL1Regularize (float lambda)
void SparseL2Regularize (float lambda)
void Save (const std::string &filename) const
void Save (std::ostream &, bool multiline=true) const
void IncrementSparseHopeFeatures ()
void IncrementSparseFearFeatures ()
void PrintSparseHopeFeatureCounts (std::ofstream &out)
void PrintSparseFearFeatureCounts (std::ofstream &out)
void PrintSparseHopeFeatureCounts ()
void PrintSparseFearFeatureCounts ()
size_t PruneSparseFeatures (size_t threshold)
size_t PruneZeroWeightFeatures ()
void UpdateConfidenceCounts (ScoreComponentCollection &weightUpdate, bool signedCounts)
void UpdateLearningRates (float decay_core, float decay_sparse, ScoreComponentCollection &confidenceCounts, float core_r0, float sparse_r0)
void Merge (const ScoreComponentCollection &other)
void OutputAllFeatureScores (std::ostream &out, bool with_labels) const
void OutputFeatureScores (std::ostream &out, Moses::FeatureFunction const *ff, std::string &lastName, bool with_labels) const

Static Public Member Functions

static void ResetCounter ()
static void RegisterScoreProducer (FeatureFunction *scoreProducer)
static FVector CreateFVector ()

Friends

std::ostream & operator<< (std::ostream &os, const ScoreComponentCollection &rhs)
void swap (ScoreComponentCollection &first, ScoreComponentCollection &second)


Detailed Description

Definition at line 87 of file ScoreComponentCollection.h.


Constructor & Destructor Documentation

Moses::ScoreComponentCollection::ScoreComponentCollection (  ) 

Create a new score collection with all values set to 0.0.

Definition at line 57 of file ScoreComponentCollection.cpp.

Moses::ScoreComponentCollection::ScoreComponentCollection ( const ScoreComponentCollection rhs  )  [inline]

Clone a score collection.

Definition at line 124 of file ScoreComponentCollection.h.


Member Function Documentation

void Moses::ScoreComponentCollection::Assign ( const std::string  name,
float  score 
) [inline]

Definition at line 317 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::Assign ( const FeatureFunction sp,
const std::string &  line 
)

void Moses::ScoreComponentCollection::Assign ( const FeatureFunction sp,
const StringPiece name,
float  score 
) [inline]

Definition at line 307 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetScoreProducerDescription().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::Assign ( size_t  index,
float  score 
) [inline]

Definition at line 303 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::Assign ( const FeatureFunction sp,
float  score 
) [inline]

Special version Assign(ScoreProducer, vector<float>) to add the score from a single ScoreProducer that produces a single value

Definition at line 295 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), and UTIL_THROW_IF2.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::Assign ( const FeatureFunction sp,
const std::vector< float > &  scores 
)

Definition at line 243 of file ScoreComponentCollection.cpp.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), Moses::FeatureFunction::GetScoreProducerDescription(), and UTIL_THROW.

Referenced by BOOST_FIXTURE_TEST_CASE(), Moses::PhraseDictionaryOnDisk::ConvertToMoses(), Moses::PDTAimp::CreateTargetPhrase(), Moses::PhraseDictionaryGroup::CreateTargetPhraseCollection(), Moses::PhraseDictionaryMultiModel::CreateTargetPhraseCollectionLinearInterpolation(), Moses::PhraseDictionaryDynamicCacheBased::Decay(), Moses::PhraseDecoder::DecodeCollection(), Moses::LanguageModel::EvaluateInIsolation(), Moses::WordPenaltyProducer::EvaluateInIsolation(), Moses::PhrasePenalty::EvaluateInIsolation(), Moses::DynamicCacheBasedLanguageModel::EvaluateInIsolation(), Moses::PhraseDistanceFeature::EvaluateWithSourceContext(), Moses::CoveredReferenceFeature::EvaluateWithSourceContext(), Moses::PDTAimp::GetTargetPhraseCollection(), Moses::PhraseDictionaryFuzzyMatch::InitializeForInput(), InvertDenseFeatures(), Moses::RuleTableLoaderStandard::Load(), Moses::Syntax::T2S::RuleTrieLoader::Load(), Moses::Syntax::S2T::RuleTrieLoader::Load(), Moses::Syntax::F2S::HyperTreeLoader::Load(), Moses::StaticData::LoadSparseWeightsFromConfig(), main(), Moses::Incremental::PhraseAndFeatures(), Moses::ChartParserUnknown::Process(), Moses::ProcessAndStripXMLTags(), Moses::TranslationOptionCollection::ProcessOneUnknownWord(), Moses::StaticData::ResetWeights(), Moses::TargetPhrase::SetSparseScore(), Moses::StaticData::SetWeight(), Moses::StaticData::SetWeights(), Moses::TargetPhrase::SetXMLScore(), Moses::PhraseDictionaryDynamicCacheBased::Update(), and ZeroDenseFeatures().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::CapMax ( float  maxValue  )  [inline]

Definition at line 363 of file ScoreComponentCollection.h.

References Moses::FVector::capMax().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::CapMin ( float  minValue  )  [inline]

Definition at line 368 of file ScoreComponentCollection.h.

References Moses::FVector::capMin().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::CoreAssign ( const ScoreComponentCollection rhs  )  [inline]

Definition at line 187 of file ScoreComponentCollection.h.

References Moses::FVector::coreAssign().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::CoreDivideEquals ( float  scalar  ) 

Definition at line 116 of file ScoreComponentCollection.cpp.

References Moses::FVector::coreDivideEquals().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::CorePlusEquals ( const ScoreComponentCollection rhs  )  [inline]

Definition at line 202 of file ScoreComponentCollection.h.

References Moses::FVector::corePlusEquals().

Here is the call graph for this function:

static FVector Moses::ScoreComponentCollection::CreateFVector (  )  [inline, static]

Create and FVector with the right number of core features

Definition at line 163 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::DivideEquals ( const ScoreComponentCollection rhs  ) 

Definition at line 121 of file ScoreComponentCollection.cpp.

References Moses::FVector::divideEquals().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::DivideEquals ( float  scalar  ) 

Definition at line 111 of file ScoreComponentCollection.cpp.

const std::valarray<FValue>& Moses::ScoreComponentCollection::getCoreFeatures (  )  const [inline]

Definition at line 148 of file ScoreComponentCollection.h.

References Moses::FVector::getCoreFeatures().

Here is the call graph for this function:

float Moses::ScoreComponentCollection::GetL1Norm (  )  const

Definition at line 151 of file ScoreComponentCollection.cpp.

References Moses::FVector::l1norm().

Here is the call graph for this function:

float Moses::ScoreComponentCollection::GetL2Norm (  )  const

Definition at line 156 of file ScoreComponentCollection.cpp.

References Moses::FVector::l2norm().

Here is the call graph for this function:

float Moses::ScoreComponentCollection::GetLInfNorm (  )  const

Definition at line 161 of file ScoreComponentCollection.cpp.

References Moses::FVector::linfnorm().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::GetNumberWeights ( const FeatureFunction sp  ) 

float Moses::ScoreComponentCollection::GetScoreForProducer ( const FeatureFunction sp,
const std::string &  name 
) const [inline]

Definition at line 388 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetScoreProducerDescription().

Here is the call graph for this function:

float Moses::ScoreComponentCollection::GetScoreForProducer ( const FeatureFunction sp  )  const [inline]

if a FeatureFunction produces a single score (for example, a language model score) this will return it. If not, this method will throw

Definition at line 380 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), and UTIL_THROW_IF2.

Referenced by BOOST_FIXTURE_TEST_CASE(), Moses::BilingualLM::EvaluateWhenApplied(), Moses::StaticData::GetWeight(), Moses::HypothesisScoreOrdererWithDistortion::HypothesisScoreOrdererWithDistortion(), and Moses::Manager::OutputWordGraph().

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector<float> Moses::ScoreComponentCollection::GetScoresForProducer ( const FeatureFunction sp  )  const [inline]

const FVector& Moses::ScoreComponentCollection::GetScoresVector (  )  const [inline]

Definition at line 144 of file ScoreComponentCollection.h.

Referenced by main(), and Moses::PackScores().

Here is the caller graph for this function:

float Moses::ScoreComponentCollection::GetSparseWeight ( const FName featureName  )  const [inline]

Definition at line 348 of file ScoreComponentCollection.h.

FVector Moses::ScoreComponentCollection::GetVectorForProducer ( const FeatureFunction sp  )  const

get subset of scores that belong to a certain sparse ScoreProducer

Definition at line 285 of file ScoreComponentCollection.cpp.

References Moses::FVector::cbegin(), Moses::FVector::cend(), Moses::FeatureFunction::GetScoreProducerDescription(), Moses::FName::SEP, and starts_with().

Referenced by OutputFeatureScores().

Here is the call graph for this function:

Here is the caller graph for this function:

float Moses::ScoreComponentCollection::GetWeightedScore (  )  const

void Moses::ScoreComponentCollection::IncrementSparseFearFeatures (  )  [inline]

Definition at line 411 of file ScoreComponentCollection.h.

References Moses::FVector::incrementSparseFearFeatures().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::IncrementSparseHopeFeatures (  )  [inline]

Definition at line 408 of file ScoreComponentCollection.h.

References Moses::FVector::incrementSparseHopeFeatures().

Here is the call graph for this function:

float Moses::ScoreComponentCollection::InnerProduct ( const ScoreComponentCollection rhs  )  const [inline]

Definition at line 322 of file ScoreComponentCollection.h.

References Moses::FVector::inner_product().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::InvertDenseFeatures ( const FeatureFunction sp  ) 

Definition at line 261 of file ScoreComponentCollection.cpp.

References Assign(), and GetScoresForProducer().

Referenced by Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), and Moses::PhraseDictionaryGroup::CreateTargetPhraseCollection().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::L1Normalise (  ) 

Definition at line 146 of file ScoreComponentCollection.cpp.

References Moses::FVector::l1norm_coreFeatures().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::L1Regularize ( float  lambda  ) 

Definition at line 166 of file ScoreComponentCollection.cpp.

References Moses::FVector::l1regularize().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::L2Regularize ( float  lambda  ) 

Definition at line 171 of file ScoreComponentCollection.cpp.

References Moses::FVector::l2regularize().

Here is the call graph for this function:

bool Moses::ScoreComponentCollection::Load ( const std::string &  filename  )  [inline]

Load from file

Definition at line 140 of file ScoreComponentCollection.h.

References Moses::FVector::load().

Referenced by Moses::StaticData::LoadAlternateWeightSettings(), and Moses::StaticData::LoadData().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::Merge ( const ScoreComponentCollection other  )  [inline]

Definition at line 438 of file ScoreComponentCollection.h.

References Moses::FVector::merge().

Referenced by Moses::TargetPhrase::Merge().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::MinusEquals ( const FeatureFunction sp,
const std::string &  name,
float  score 
) [inline]

Definition at line 216 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetScoreProducerDescription().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::MinusEquals ( const ScoreComponentCollection rhs  )  [inline]

subtract the score in rhs

Definition at line 211 of file ScoreComponentCollection.h.

Referenced by Moses::Syntax::KBestExtractor::Derivation::Derivation(), and Moses::OutputSearchNode().

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::MultiplyEquals ( const FeatureFunction sp,
float  scalar 
)

void Moses::ScoreComponentCollection::MultiplyEquals ( float  core_r0,
float  sparse_r0 
)

Definition at line 136 of file ScoreComponentCollection.cpp.

References Moses::FVector::multiplyEquals().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::MultiplyEquals ( const ScoreComponentCollection rhs  ) 

Definition at line 126 of file ScoreComponentCollection.cpp.

void Moses::ScoreComponentCollection::MultiplyEquals ( float  scalar  ) 

Definition at line 82 of file ScoreComponentCollection.cpp.

void Moses::ScoreComponentCollection::MultiplyEqualsBackoff ( const ScoreComponentCollection rhs,
float  backoff 
)

Definition at line 131 of file ScoreComponentCollection.cpp.

References Moses::FVector::multiplyEqualsBackoff().

Here is the call graph for this function:

ScoreComponentCollection& Moses::ScoreComponentCollection::operator= ( const ScoreComponentCollection rhs  )  [inline]

Definition at line 128 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::OutputAllFeatureScores ( std::ostream &  out,
bool  with_labels 
) const

void Moses::ScoreComponentCollection::OutputFeatureScores ( std::ostream &  out,
Moses::FeatureFunction const *  ff,
std::string &  lastName,
bool  with_labels 
) const

float Moses::ScoreComponentCollection::PartialInnerProduct ( const FeatureFunction sp,
const std::vector< float > &  rhs 
) const [inline]

Definition at line 326 of file ScoreComponentCollection.h.

References GetScoresForProducer(), Moses::inner_product(), and UTIL_THROW_IF2.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( size_t  index,
float  score 
) [inline]

Definition at line 276 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
const ScorePair scorePair 
)

Definition at line 298 of file ScoreComponentCollection.cpp.

References Moses::ScorePair::denseScores, key, PlusEquals(), and Moses::ScorePair::sparseScores.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
const StringPiece name,
float  score 
) [inline]

Definition at line 268 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetScoreProducerDescription().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
float  score 
) [inline]

Special version PlusEquals(ScoreProducer, vector<float>) to add the score from a single ScoreProducer that produces a single value

Definition at line 261 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), and UTIL_THROW_IF2.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
float  scores[] 
) [inline]

Definition at line 250 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), and Moses::FeatureFunction::GetNumScoreComponents().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
const std::vector< float > &  scores 
) [inline]

Add scores from a single FeatureFunction only The length of scores must be equal to the number of score components produced by sp

Definition at line 241 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), and UTIL_THROW_IF2.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FeatureFunction sp,
const ScoreComponentCollection scores 
) [inline]

Add scores from a single ScoreProducer only The length of scores must be equal to the number of score components produced by sp

Definition at line 231 of file ScoreComponentCollection.h.

References Moses::FeatureFunction::GetIndex(), Moses::FeatureFunction::GetNumScoreComponents(), and stop.

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PlusEquals ( const FVector scores  )  [inline]

Definition at line 206 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::PlusEquals ( const ScoreComponentCollection rhs  )  [inline]

add the score in rhs

Definition at line 192 of file ScoreComponentCollection.h.

Referenced by BOOST_FIXTURE_TEST_CASE(), Moses::TargetWordInsertionFeature::ComputeFeatures(), Moses::SourceWordDeletionFeature::ComputeFeatures(), Moses::EditOps::ComputeFeatures(), Moses::CorrectionPattern::ComputeFeatures(), Moses::LRState::CopyScores(), Moses::ProbingPT::CreateTargetPhrase(), Moses::ExamplePT::CreateTargetPhrase(), Moses::Syntax::KBestExtractor::Derivation::Derivation(), Moses::BackwardLanguageModel< Model >::Evaluate(), Moses::UnalignedWordCountFeature::EvaluateInIsolation(), Moses::RuleScope::EvaluateInIsolation(), Moses::RulePairUnlexicalizedSource::EvaluateInIsolation(), Moses::PhraseLengthFeature::EvaluateInIsolation(), Moses::OpSequenceModel::EvaluateInIsolation(), Moses::ExampleStatelessFF::EvaluateInIsolation(), Moses::DesegModel::EvaluateInIsolation(), Moses::DeleteRules::EvaluateInIsolation(), Moses::CountNonTerms::EvaluateInIsolation(), Moses::VW::EvaluateTranslationOptionListWithSourceContext(), Moses::ExampleTranslationOptionListFeature::EvaluateTranslationOptionListWithSourceContext(), Moses::Syntax::InputWeightFF::EvaluateWhenApplied(), Moses::RDLM::EvaluateWhenApplied(), Moses::LanguageModelKen< Model >::EvaluateWhenApplied(), Moses::LanguageModelIRST::EvaluateWhenApplied(), Moses::LanguageModelImplementation::EvaluateWhenApplied(), Moses::LanguageModelDALM::EvaluateWhenApplied(), Moses::BilingualLM::EvaluateWhenApplied(), Moses::VW::EvaluateWhenApplied(), Moses::TargetPreferencesFeature::EvaluateWhenApplied(), Moses::TargetNgramFeature::EvaluateWhenApplied(), Moses::TargetConstituentAdjacencyFeature::EvaluateWhenApplied(), Moses::TargetBigramFeature::EvaluateWhenApplied(), Moses::SparseHieroReorderingFeature::EvaluateWhenApplied(), Moses::SoftMatchingFeature::EvaluateWhenApplied(), Moses::PhraseOrientationFeature::EvaluateWhenApplied(), Moses::OpSequenceModel::EvaluateWhenApplied(), Moses::ExampleStatefulFF::EvaluateWhenApplied(), Moses::DesegModel::EvaluateWhenApplied(), Moses::DistortionScoreProducer::EvaluateWhenApplied(), Moses::CoveredReferenceFeature::EvaluateWhenApplied(), Moses::ConstrainedDecoding::EvaluateWhenApplied(), Moses::BleuScoreFeature::EvaluateWhenApplied(), Moses::SyntaxRHS::EvaluateWithSourceContext(), Moses::SpanLength::EvaluateWithSourceContext(), Moses::SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(), Moses::SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(), Moses::NieceTerminal::EvaluateWithSourceContext(), Moses::Model1Feature::EvaluateWithSourceContext(), Moses::MaxSpanFreeNonTermSource::EvaluateWithSourceContext(), Moses::InputFeature::EvaluateWithSourceContext(), Moses::GlobalLexicalModel::EvaluateWithSourceContext(), Moses::ExampleStatelessFF::EvaluateWithSourceContext(), Moses::Hypothesis::Hypothesis(), Moses::PhraseDictionaryMemoryPerSentenceOnDemand::InitializeForInput(), Moses::PhraseDictionaryMemoryPerSentence::InitializeForInput(), Moses::StaticData::LoadData(), Moses::PhraseOrientationFeature::LookaheadScore(), Moses::SCCPlus::operator()(), PlusEquals(), Moses::DecodeStepGeneration::Process(), Moses::TranslationOptionCollection::SetInputScore(), Moses::PhraseOrientationFeature::SparseNonTerminalL2RScore(), Moses::PhraseOrientationFeature::SparseNonTerminalR2LScore(), Moses::PhraseOrientationFeature::SparseWordL2RScore(), and Moses::PhraseOrientationFeature::SparseWordR2LScore().

void Moses::ScoreComponentCollection::PrintCoreFeatures (  )  [inline]

Definition at line 352 of file ScoreComponentCollection.h.

References Moses::FVector::printCoreFeatures().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PrintSparseFearFeatureCounts (  )  [inline]

Definition at line 423 of file ScoreComponentCollection.h.

References Moses::FVector::printSparseFearFeatureCounts().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PrintSparseFearFeatureCounts ( std::ofstream &  out  )  [inline]

Definition at line 417 of file ScoreComponentCollection.h.

References Moses::FVector::printSparseFearFeatureCounts().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PrintSparseHopeFeatureCounts (  )  [inline]

Definition at line 420 of file ScoreComponentCollection.h.

References Moses::FVector::printSparseHopeFeatureCounts().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::PrintSparseHopeFeatureCounts ( std::ofstream &  out  )  [inline]

Definition at line 414 of file ScoreComponentCollection.h.

References Moses::FVector::printSparseHopeFeatureCounts().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::PruneSparseFeatures ( size_t  threshold  )  [inline]

Definition at line 426 of file ScoreComponentCollection.h.

References Moses::FVector::pruneSparseFeatures().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::PruneZeroWeightFeatures (  )  [inline]

Definition at line 429 of file ScoreComponentCollection.h.

References Moses::FVector::pruneZeroWeightFeatures().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::RegisterScoreProducer ( FeatureFunction scoreProducer  )  [static]

Register a ScoreProducer with a fixed number of scores, so that it can be allocated space in the dense part of the feature vector.

Definition at line 64 of file ScoreComponentCollection.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription(), Moses::FeatureFunction::SetIndex(), and VERBOSE.

Referenced by Moses::FeatureFunction::Register().

Here is the call graph for this function:

Here is the caller graph for this function:

static void Moses::ScoreComponentCollection::ResetCounter (  )  [inline, static]

Definition at line 116 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::Resize (  )  [inline]

Definition at line 156 of file ScoreComponentCollection.h.

References Moses::FVector::coreSize(), and Moses::FVector::resize().

Referenced by Moses::StaticData::SetWeight(), and Moses::StaticData::SetWeights().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::Save ( std::ostream &  ,
bool  multiline = true 
) const

void Moses::ScoreComponentCollection::Save ( const std::string &  filename  )  const

Referenced by Moses::OutputFeatureWeightsForHypergraph(), and Moses::BaseManager::OutputSearchGraphAsHypergraph().

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::SetToBinaryOf ( const ScoreComponentCollection rhs  )  [inline]

Definition at line 167 of file ScoreComponentCollection.h.

References Moses::FVector::setToBinaryOf().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::Size (  )  const [inline]

Definition at line 152 of file ScoreComponentCollection.h.

References Moses::FVector::size().

Here is the call graph for this function:

size_t Moses::ScoreComponentCollection::SparseL1Regularize ( float  lambda  ) 

Definition at line 176 of file ScoreComponentCollection.cpp.

References Moses::FVector::sparseL1regularize().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::SparseL2Regularize ( float  lambda  ) 

Definition at line 181 of file ScoreComponentCollection.cpp.

References Moses::FVector::sparseL2regularize().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::SparseMinusEquals ( const std::string &  full_name,
float  score 
) [inline]

Definition at line 222 of file ScoreComponentCollection.h.

Referenced by Moses::TargetNgramFeature::EvaluateWhenApplied().

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::SparsePlusEquals ( const FName fname,
float  score 
) [inline]

Definition at line 286 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::SparsePlusEquals ( const std::string &  full_name,
float  score 
) [inline]

Definition at line 281 of file ScoreComponentCollection.h.

void Moses::ScoreComponentCollection::SparsePlusEquals ( const ScoreComponentCollection rhs  )  [inline]

void Moses::ScoreComponentCollection::ThresholdScaling ( float  maxValue  )  [inline]

Definition at line 356 of file ScoreComponentCollection.h.

References Moses::FVector::thresholdScale().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::UpdateConfidenceCounts ( ScoreComponentCollection weightUpdate,
bool  signedCounts 
) [inline]

Definition at line 432 of file ScoreComponentCollection.h.

References Moses::FVector::updateConfidenceCounts().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::UpdateLearningRates ( float  decay_core,
float  decay_sparse,
ScoreComponentCollection confidenceCounts,
float  core_r0,
float  sparse_r0 
) [inline]

Definition at line 435 of file ScoreComponentCollection.h.

References Moses::FVector::updateLearningRates().

Here is the call graph for this function:

void Moses::ScoreComponentCollection::ZeroAll (  )  [inline]

Set all values to 0.0.

Definition at line 172 of file ScoreComponentCollection.h.

References Moses::FVector::clear().

Referenced by Moses::Incremental::PhraseAndFeatures().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::ScoreComponentCollection::ZeroDenseFeatures ( const FeatureFunction sp  ) 

Definition at line 274 of file ScoreComponentCollection.cpp.

References Assign(), and Moses::FeatureFunction::GetNumScoreComponents().

Referenced by Moses::PhraseDictionaryMultiModel::CollectSufficientStatistics(), and Moses::PhraseDictionaryGroup::CreateTargetPhraseCollection().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const ScoreComponentCollection rhs 
) [friend]

Definition at line 141 of file ScoreComponentCollection.cpp.

void swap ( ScoreComponentCollection first,
ScoreComponentCollection second 
) [friend]

Definition at line 479 of file ScoreComponentCollection.h.


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

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