Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-29 22:02:46 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-29 22:02:46 +0400
commit84ec2043b7d100ac9ac07aa7ad8c5bf577dcad8b (patch)
treecb6b40e254221cf44103e26db9ecde441b585a11
parent8f7c12ef407557bcf0f1a4358a2758ef37ed1e96 (diff)
cleanup CreateTargetPhrase()
-rw-r--r--moses/PDTAimp.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/moses/PDTAimp.h b/moses/PDTAimp.h
index 735179217..17ca1d89b 100644
--- a/moses/PDTAimp.h
+++ b/moses/PDTAimp.h
@@ -161,8 +161,7 @@ public:
FloorScore);
//sparse features.
//These are already in log-space
- ScoreComponentCollection sparseFeatures;
- CreateTargetPhrase(targetPhrase,factorStrings,scoreVector, sparseFeatures, wacands[i], weights, weightWP, &src);
+ CreateTargetPhrase(targetPhrase,factorStrings,scoreVector, wacands[i], &src);
costs.push_back(std::make_pair(-targetPhrase.GetFutureScore(),tCands.size()));
tCands.push_back(targetPhrase);
}
@@ -254,21 +253,15 @@ public:
void CreateTargetPhrase(TargetPhrase& targetPhrase,
StringTgtCand::Tokens const& factorStrings,
Scores const& scoreVector,
- const ScoreComponentCollection& sparseFeatures,
const std::string& alignmentString,
- std::vector<float> &weights,
- float weightWP,
Phrase const* srcPtr=0) const {
- CreateTargetPhrase(targetPhrase, factorStrings, scoreVector, sparseFeatures, weights, weightWP, srcPtr);
+ CreateTargetPhrase(targetPhrase, factorStrings, scoreVector, srcPtr);
targetPhrase.SetAlignmentInfo(alignmentString);
}
void CreateTargetPhrase(TargetPhrase& targetPhrase,
StringTgtCand::Tokens const& factorStrings,
Scores const& scoreVector,
- const ScoreComponentCollection& sparseFeatures,
- std::vector<float> &weights,
- float weightWP,
Phrase const* srcPtr) const {
FactorCollection &factorCollection = FactorCollection::Instance();
@@ -493,7 +486,7 @@ public:
for(E2Costs::const_iterator j=i->second.begin(); j!=i->second.end(); ++j) {
TScores const & scores=j->second;
TargetPhrase targetPhrase;
- CreateTargetPhrase(targetPhrase,j->first,scores.trans,ScoreComponentCollection(),weightT,weightWP,scores.src);
+ CreateTargetPhrase(targetPhrase,j->first,scores.trans,scores.src);
costs.push_back(std::make_pair(-targetPhrase.GetFutureScore(),tCands.size()));
tCands.push_back(targetPhrase);
//std::cerr << i->first.first << "-" << i->first.second << ": " << targetPhrase << std::endl;