diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2017-02-16 01:20:41 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2017-02-16 01:20:41 +0300 |
commit | 804cccca3fec61afc614c562e0ac57bf5b7ea208 (patch) | |
tree | f9de3ceb594729c05177948acc2c7d8b26a6d399 /moses2/TranslationModel | |
parent | 74b123649ea36af6a66790b7dd922ede91d0b4a2 (diff) |
probing pt lib compiles.2
Diffstat (limited to 'moses2/TranslationModel')
-rw-r--r-- | moses2/TranslationModel/ProbingPT.cpp (renamed from moses2/TranslationModel/ProbingPT/ProbingPT.cpp) | 44 | ||||
-rw-r--r-- | moses2/TranslationModel/ProbingPT.h (renamed from moses2/TranslationModel/ProbingPT/ProbingPT.h) | 18 |
2 files changed, 33 insertions, 29 deletions
diff --git a/moses2/TranslationModel/ProbingPT/ProbingPT.cpp b/moses2/TranslationModel/ProbingPT.cpp index 852f0a7b7..5f5090def 100644 --- a/moses2/TranslationModel/ProbingPT/ProbingPT.cpp +++ b/moses2/TranslationModel/ProbingPT.cpp @@ -6,24 +6,24 @@ */ #include <boost/foreach.hpp> #include "ProbingPT.h" -#include "querying.hh" -#include "probing_hash_utils.hh" +#include "probingpt/querying.hh" +#include "probingpt/probing_hash_utils.hh" #include "util/exception.hh" -#include "../../System.h" -#include "../../Scores.h" -#include "../../Phrase.h" -#include "../../legacy/InputFileStream.h" -#include "../../legacy/FactorCollection.h" -#include "../../legacy/Util2.h" -#include "../../FF/FeatureFunctions.h" -#include "../../PhraseBased/PhraseImpl.h" -#include "../../PhraseBased/TargetPhraseImpl.h" -#include "../../PhraseBased/Manager.h" -#include "../../PhraseBased/TargetPhrases.h" -#include "../../SCFG/InputPath.h" -#include "../../SCFG/Manager.h" -#include "../../SCFG/TargetPhraseImpl.h" -#include "../../SCFG/PhraseImpl.h" +#include "../System.h" +#include "../Scores.h" +#include "../Phrase.h" +#include "../legacy/InputFileStream.h" +#include "../legacy/FactorCollection.h" +#include "../legacy/Util2.h" +#include "../FF/FeatureFunctions.h" +#include "../PhraseBased/PhraseImpl.h" +#include "../PhraseBased/TargetPhraseImpl.h" +#include "../PhraseBased/Manager.h" +#include "../PhraseBased/TargetPhrases.h" +#include "../SCFG/InputPath.h" +#include "../SCFG/Manager.h" +#include "../SCFG/TargetPhraseImpl.h" +#include "../SCFG/PhraseImpl.h" using namespace std; @@ -81,7 +81,7 @@ ProbingPT::~ProbingPT() void ProbingPT::Load(System &system) { - m_engine = new QueryEngine(m_path.c_str(), load_method); + m_engine = new probingpt::QueryEngine(m_path.c_str(), load_method); m_unkId = 456456546456; @@ -293,14 +293,14 @@ TargetPhraseImpl *ProbingPT::CreateTargetPhrase( const System &system, const char *&offset) const { - TargetPhraseInfo *tpInfo = (TargetPhraseInfo*) offset; + probingpt::TargetPhraseInfo *tpInfo = (probingpt::TargetPhraseInfo*) offset; size_t numRealWords = tpInfo->numWords / m_output.size(); TargetPhraseImpl *tp = new (pool.Allocate<TargetPhraseImpl>()) TargetPhraseImpl(pool, *this, system, numRealWords); - offset += sizeof(TargetPhraseInfo); + offset += sizeof(probingpt::TargetPhraseInfo); // scores SCORE *scores = (SCORE*) offset; @@ -600,12 +600,12 @@ SCFG::TargetPhraseImpl *ProbingPT::CreateTargetPhraseSCFG( const System &system, const char *&offset) const { - TargetPhraseInfo *tpInfo = (TargetPhraseInfo*) offset; + probingpt::TargetPhraseInfo *tpInfo = (probingpt::TargetPhraseInfo*) offset; SCFG::TargetPhraseImpl *tp = new (pool.Allocate<SCFG::TargetPhraseImpl>()) SCFG::TargetPhraseImpl(pool, *this, system, tpInfo->numWords - 1); - offset += sizeof(TargetPhraseInfo); + offset += sizeof(probingpt::TargetPhraseInfo); // scores SCORE *scores = (SCORE*) offset; diff --git a/moses2/TranslationModel/ProbingPT/ProbingPT.h b/moses2/TranslationModel/ProbingPT.h index e0dcf40f1..47d22e1b3 100644 --- a/moses2/TranslationModel/ProbingPT/ProbingPT.h +++ b/moses2/TranslationModel/ProbingPT.h @@ -11,17 +11,21 @@ #include <boost/thread/tss.hpp> #include <boost/bimap.hpp> #include <deque> -#include "../PhraseTable.h" -#include "../../Vector.h" -#include "../../Phrase.h" -#include "../../SCFG/ActiveChart.h" +#include "PhraseTable.h" +#include "../Vector.h" +#include "../Phrase.h" +#include "../SCFG/ActiveChart.h" #include "util/mmap.hh" -namespace Moses2 +namespace probingpt { -class AlignmentInfo; class QueryEngine; class target_text; +} + +namespace Moses2 +{ +class AlignmentInfo; class MemPool; class System; class RecycleData; @@ -98,7 +102,7 @@ protected: util::LoadMethod load_method; uint64_t m_unkId; - QueryEngine *m_engine; + probingpt::QueryEngine *m_engine; void CreateAlignmentMap(System &system, const std::string path); |