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:
authorbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2010-08-10 17:12:00 +0400
committerbhaddow <bhaddow@1f5c12ca-751b-0410-a591-d2e778427230>2010-08-10 17:12:00 +0400
commit904133fcb72b4e4b2dff4632f8844cda2eb16aba (patch)
tree0f3ca59ebc6d143576737a4f568dba593bdb1b53 /OnDiskPt
parentd31b030bc506065e2e451d1a90d58ec5f097ad1e (diff)
Merge in the multiple models branch. These changes allow the moses server
to support multiple translation, language and generation models within the same process. The main design change is the introduction of a TranslationSystem object to manage the models, which have been moved out of StaticData. The changes should have no effect on existing systems. git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3394 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'OnDiskPt')
-rw-r--r--OnDiskPt/src/TargetPhrase.cpp5
-rw-r--r--OnDiskPt/src/TargetPhrase.h3
-rw-r--r--OnDiskPt/src/TargetPhraseCollection.cpp4
-rw-r--r--OnDiskPt/src/TargetPhraseCollection.h3
4 files changed, 9 insertions, 6 deletions
diff --git a/OnDiskPt/src/TargetPhrase.cpp b/OnDiskPt/src/TargetPhrase.cpp
index b15e4d0d5..a54eb701a 100644
--- a/OnDiskPt/src/TargetPhrase.cpp
+++ b/OnDiskPt/src/TargetPhrase.cpp
@@ -11,6 +11,7 @@
#include "../../moses/src/Util.h"
#include "../../moses/src/TargetPhrase.h"
#include "../../moses/src/PhraseDictionary.h"
+#include "../../moses/src/DummyScoreProducers.h"
#include "TargetPhrase.h"
#include "OnDiskWrapper.h"
@@ -186,7 +187,7 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto
, const Vocab &vocab
, const Moses::PhraseDictionary &phraseDict
, const std::vector<float> &weightT
- , float weightWP
+ , const Moses::WordPenaltyProducer* wpProducer
, const Moses::LMList &lmList
, const Moses::Phrase &sourcePhrase) const
{
@@ -208,7 +209,7 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto
}
// scores
- ret->SetScoreChart(phraseDict.GetFeature(), m_scores, weightT, lmList);
+ ret->SetScoreChart(phraseDict.GetFeature(), m_scores, weightT, lmList, wpProducer);
// alignments
std::list<std::pair<size_t, size_t> > alignmentInfo;
diff --git a/OnDiskPt/src/TargetPhrase.h b/OnDiskPt/src/TargetPhrase.h
index 640b0ba3b..64805d917 100644
--- a/OnDiskPt/src/TargetPhrase.h
+++ b/OnDiskPt/src/TargetPhrase.h
@@ -19,6 +19,7 @@ namespace Moses
class TargetPhrase;
class LMList;
class Phrase;
+ class WordPenaltyProducer;
}
namespace OnDiskPt
@@ -70,7 +71,7 @@ public:
, const Vocab &vocab
, const Moses::PhraseDictionary &phraseDict
, const std::vector<float> &weightT
- , float weightWP
+ , const Moses::WordPenaltyProducer* wpProducer
, const Moses::LMList &lmList
, const Moses::Phrase &sourcePhrase) const;
UINT64 ReadOtherInfoFromFile(UINT64 filePos, std::fstream &fileTPColl);
diff --git a/OnDiskPt/src/TargetPhraseCollection.cpp b/OnDiskPt/src/TargetPhraseCollection.cpp
index 103a0a331..b035279c3 100644
--- a/OnDiskPt/src/TargetPhraseCollection.cpp
+++ b/OnDiskPt/src/TargetPhraseCollection.cpp
@@ -101,7 +101,7 @@ Moses::TargetPhraseCollection *TargetPhraseCollection::ConvertToMoses(const std:
, const std::vector<Moses::FactorType> &outputFactors
, const Moses::PhraseDictionary &phraseDict
, const std::vector<float> &weightT
- , float weightWP
+ , const Moses::WordPenaltyProducer* wpProducer
, const Moses::LMList &lmList
, const Moses::Phrase &sourcePhrase
, const std::string &filePath
@@ -117,7 +117,7 @@ Moses::TargetPhraseCollection *TargetPhraseCollection::ConvertToMoses(const std:
, vocab
, phraseDict
, weightT
- , weightWP
+ , wpProducer
, lmList
, sourcePhrase);
diff --git a/OnDiskPt/src/TargetPhraseCollection.h b/OnDiskPt/src/TargetPhraseCollection.h
index 77d9c823f..ca56bbb34 100644
--- a/OnDiskPt/src/TargetPhraseCollection.h
+++ b/OnDiskPt/src/TargetPhraseCollection.h
@@ -8,6 +8,7 @@ namespace Moses
class TargetPhraseCollection;
class PhraseDictionary;
class LMList;
+ class WordPenaltyProducer;
}
namespace OnDiskPt
@@ -50,7 +51,7 @@ public:
, const std::vector<Moses::FactorType> &outputFactors
, const Moses::PhraseDictionary &phraseDict
, const std::vector<float> &weightT
- , float weightWP
+ , const Moses::WordPenaltyProducer* wpProducer
, const Moses::LMList &lmList
, const Moses::Phrase &sourcePhrase
, const std::string &filePath