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:
Diffstat (limited to 'moses/TranslationModel/ProbingPT/ProbingPT.h')
-rw-r--r--moses/TranslationModel/ProbingPT/ProbingPT.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/moses/TranslationModel/ProbingPT/ProbingPT.h b/moses/TranslationModel/ProbingPT/ProbingPT.h
index 4e7ab02c6..3b5dfc895 100644
--- a/moses/TranslationModel/ProbingPT/ProbingPT.h
+++ b/moses/TranslationModel/ProbingPT/ProbingPT.h
@@ -1,17 +1,17 @@
#pragma once
-
+#include <boost/iostreams/device/mapped_file.hpp>
#include <boost/bimap.hpp>
#include "../PhraseDictionary.h"
-class QueryEngine;
-class target_text;
namespace Moses
{
class ChartParser;
class ChartCellCollectionBase;
class ChartRuleLookupManager;
+class QueryEngine;
+class target_text;
class ProbingPT : public PhraseDictionary
{
@@ -39,12 +39,16 @@ public:
protected:
QueryEngine *m_engine;
+ uint64_t m_unkId;
- typedef boost::bimap<const Factor *, uint64_t> SourceVocabMap;
- mutable SourceVocabMap m_sourceVocabMap;
+ std::vector<uint64_t> m_sourceVocab; // factor id -> pt id
+ std::vector<const Factor*> m_targetVocab; // pt id -> factor*
+ std::vector<const AlignmentInfo*> m_aligns;
- typedef boost::bimap<const Factor *, unsigned int> TargetVocabMap;
- mutable TargetVocabMap m_vocabMap;
+ boost::iostreams::mapped_file_source file;
+ const char *data;
+
+ void CreateAlignmentMap(const std::string path);
TargetPhraseCollection::shared_ptr CreateTargetPhrase(const Phrase &sourcePhrase) const;
TargetPhrase *CreateTargetPhrase(const Phrase &sourcePhrase, const target_text &probingTargetPhrase) const;
@@ -53,7 +57,6 @@ protected:
std::vector<uint64_t> ConvertToProbingSourcePhrase(const Phrase &sourcePhrase, bool &ok) const;
- uint64_t m_unkId;
};
} // namespace Moses