Merge branch 'perf_moses2' of github.com:hieuhoang/mosesdecoder into perf_moses2

This commit is contained in:
Hieu Hoang 2016-08-12 14:19:48 +02:00
commit 3de9f8b66c
4 changed files with 8 additions and 4 deletions

View File

@ -215,6 +215,7 @@ void FeatureFunctions::ShowWeights(const Weights &allWeights)
BOOST_FOREACH(const FeatureFunction *ff, m_featureFunctions) {
cout << ff->GetName();
if (ff->IsTuneable()) {
cout << "=";
vector<SCORE> weights = allWeights.GetWeights(*ff);
for (size_t i = 0; i < weights.size(); ++i) {
cout << " " << weights[i];

View File

@ -238,9 +238,11 @@ void Scores::OutputBreakdown(std::ostream &out, const System &system) const
{
if (system.options.nbest.nbest_size) {
BOOST_FOREACH(const FeatureFunction *ff, system.featureFunctions.GetFeatureFunctions()){
out << ff->GetName() << "= ";
for (size_t i = ff->GetStartInd(); i < (ff->GetStartInd() + ff->GetNumScores()); ++i) {
out << m_scores[i] << " ";
if (ff->IsTuneable()) {
out << ff->GetName() << "= ";
for (size_t i = ff->GetStartInd(); i < (ff->GetStartInd() + ff->GetNumScores()); ++i) {
out << m_scores[i] << " ";
}
}
}
}

View File

@ -27,6 +27,7 @@ namespace Moses2
UnknownWordPenalty::UnknownWordPenalty(size_t startInd, const std::string &line) :
PhraseTable(startInd, line)
{
m_tuneable = false;
ReadParameters();
}

View File

@ -493,7 +493,7 @@ for ( my $i = 0 ; $i <= $#TABLE ; $i++ ) {
if ($opt_hierarchical) {
$cmd .= " --scfg";
}
print STDERR "EEEEEEEXEC: $cmd \n";
print STDERR "Executing: $cmd \n";
safesystem($cmd) or die "Can't binarize";
}
else {