mosesdecoder/mira/Main.cpp File Reference

#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
#include <map>
#include <boost/program_options.hpp>
#include <boost/algorithm/string.hpp>
#include "Main.h"
#include "Optimiser.h"
#include "Hildreth.h"
#include "HypothesisQueue.h"
#include "moses/StaticData.h"
#include "moses/ChartTrellisPathList.h"
#include "moses/ChartTrellisPath.h"
#include "moses/ScoreComponentCollection.h"
#include "moses/ThreadPool.h"
#include "moses/LexicalReordering.h"
#include "mert/BleuScorer.h"
#include "moses/FeatureVector.h"
#include "moses/FF/WordTranslationFeature.h"
#include "moses/FF/PhrasePairFeature.h"
#include "moses/FF/WordPenaltyProducer.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
bool loadSentences (const string &filename, vector< string > &sentences)
bool evaluateModulo (size_t shard_position, size_t mix_or_dump_base, size_t actual_batch_size)
void printFeatureValues (vector< vector< ScoreComponentCollection > > &featureValues)
void deleteTranslations (vector< vector< const Word * > > &translations)
void decodeHopeOrFear (size_t rank, size_t size, size_t decode, string filename, vector< string > &inputSentences, MosesDecoder *decoder, size_t n, float bleuWeight)
void applyLearningRates (vector< vector< ScoreComponentCollection > > &featureValues, float core_r0, float sparse_r0)
void applyPerFeatureLearningRates (vector< vector< ScoreComponentCollection > > &featureValues, ScoreComponentCollection featureLearningRates, float sparse_r0)
void scaleFeatureScore (const FeatureFunction *sp, float scaling_factor, vector< vector< ScoreComponentCollection > > &featureValues, size_t rank, size_t epoch)
void scaleFeatureScores (const FeatureFunction *sp, float scaling_factor, vector< vector< ScoreComponentCollection > > &featureValues, size_t rank, size_t epoch)


Function Documentation

void applyLearningRates ( vector< vector< ScoreComponentCollection > > &  featureValues,
float  core_r0,
float  sparse_r0 
)

Definition at line 1836 of file Main.cpp.

Referenced by main().

Here is the caller graph for this function:

void applyPerFeatureLearningRates ( vector< vector< ScoreComponentCollection > > &  featureValues,
ScoreComponentCollection  featureLearningRates,
float  sparse_r0 
)

Definition at line 1843 of file Main.cpp.

Referenced by main().

Here is the caller graph for this function:

void decodeHopeOrFear ( size_t  rank,
size_t  size,
size_t  decode,
string  filename,
vector< string > &  inputSentences,
MosesDecoder decoder,
size_t  n,
float  bleuWeight 
)

Definition at line 1734 of file Main.cpp.

References Mira::MosesDecoder::cleanup(), Mira::MosesDecoder::getNBest(), Moses::Word::GetString(), k, and VERBOSE.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void deleteTranslations ( vector< vector< const Word * > > &  translations  ) 

Definition at line 1725 of file Main.cpp.

Referenced by main().

Here is the caller graph for this function:

bool evaluateModulo ( size_t  shard_position,
size_t  mix_or_dump_base,
size_t  actual_batch_size 
)

Definition at line 1695 of file Main.cpp.

Referenced by main().

Here is the caller graph for this function:

bool loadSentences ( const string &  filename,
vector< string > &  sentences 
)

Definition at line 1684 of file Main.cpp.

References line.

Referenced by main().

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 57 of file Main.cpp.

References applyLearningRates(), applyPerFeatureLearningRates(), Moses::ScoreComponentCollection::Assign(), Mira::MosesDecoder::cleanup(), Moses::ScoreComponentCollection::CoreDivideEquals(), decodeHopeOrFear(), deleteTranslations(), Moses::ScoreComponentCollection::DivideEquals(), Moses::HypothesisQueue::Empty(), evaluateModulo(), Mira::MosesDecoder::getAverageInputLength(), Mira::MosesDecoder::getClosestReferenceLength(), Moses::StaticData::GetInputFactorOrder(), Moses::ScoreComponentCollection::GetLInfNorm(), Mira::MosesDecoder::getNBest(), Moses::ScoreComponentCollection::GetScoreForProducer(), Mira::MosesDecoder::getTargetLengthHistory(), Mira::MosesDecoder::getWeights(), Moses::StaticData::IsChart(), Moses::ScoreComponentCollection::L1Normalise(), Moses::ScoreComponentCollection::L1Regularize(), Moses::ScoreComponentCollection::L2Regularize(), loadSentences(), Moses::ScoreComponentCollection::MinusEquals(), n, NULL, Moses::ScoreComponentCollection::PlusEquals(), Moses::HypothesisQueue::Pop(), Moses::Sentence::Print(), Mira::MosesDecoder::printBleuFeatureHistory(), Moses::ScoreComponentCollection::PrintCoreFeatures(), printFeatureValues(), Moses::ScoreComponentCollection::PrintSparseFearFeatureCounts(), Moses::ScoreComponentCollection::PrintSparseHopeFeatureCounts(), Moses::ScoreComponentCollection::PruneSparseFeatures(), Moses::ScoreComponentCollection::PruneZeroWeightFeatures(), Moses::HypothesisQueue::Push(), Moses::Sentence::Read(), Moses::ScoreComponentCollection::Save(), scaleFeatureScore(), Mira::MosesDecoder::setAvgInputLength(), Mira::MosesDecoder::setBleuParameters(), Moses::ScoreComponentCollection::SetToBinaryOf(), Mira::MosesDecoder::setWeights(), Moses::ScoreComponentCollection::SparseL1Regularize(), Moses::ScoreComponentCollection::SparseL2Regularize(), MosesTuning::split(), store(), trim(), Moses::ScoreComponentCollection::UpdateConfidenceCounts(), Mira::MosesDecoder::updateHistory(), Moses::ScoreComponentCollection::UpdateLearningRates(), Mira::Optimiser::updateWeightsHopeFear(), value, VERBOSE, and Moses::ScoreComponentCollection::ZeroAll().

void printFeatureValues ( vector< vector< ScoreComponentCollection > > &  featureValues  ) 

Definition at line 1715 of file Main.cpp.

Referenced by main().

Here is the caller graph for this function:

void scaleFeatureScore ( const FeatureFunction sp,
float  scaling_factor,
vector< vector< ScoreComponentCollection > > &  featureValues,
size_t  rank,
size_t  epoch 
)

Definition at line 1850 of file Main.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void scaleFeatureScores ( const FeatureFunction sp,
float  scaling_factor,
vector< vector< ScoreComponentCollection > > &  featureValues,
size_t  rank,
size_t  epoch 
)

Definition at line 1865 of file Main.cpp.

References Moses::FeatureFunction::GetScoreProducerDescription(), and k.

Here is the call graph for this function:


Generated on Thu Jun 4 00:30:55 2015 for Moses by  doxygen 1.5.9