diff options
-rw-r--r-- | OnDiskPt/Jamfile | 4 | ||||
-rw-r--r-- | misc/Jamfile | 26 | ||||
-rw-r--r-- | moses-cmd/Main.cpp | 18 | ||||
-rw-r--r-- | moses/BaseManager.h | 12 | ||||
-rw-r--r-- | moses/ChartManager.cpp | 12 | ||||
-rw-r--r-- | moses/ChartManager.h | 9 | ||||
-rw-r--r-- | moses/Hypothesis.cpp | 2 | ||||
-rw-r--r-- | moses/Incremental.cpp | 14 | ||||
-rw-r--r-- | moses/Incremental.h | 3 | ||||
-rw-r--r-- | moses/Jamfile | 4 | ||||
-rw-r--r-- | moses/Manager.cpp | 14 | ||||
-rw-r--r-- | moses/Manager.h | 3 | ||||
-rw-r--r-- | moses/Syntax/S2T/Manager-inl.h | 2 | ||||
-rw-r--r-- | moses/Syntax/S2T/Manager.h | 3 | ||||
-rw-r--r-- | moses/TranslationModel/UG/Jamfile | 9 | ||||
-rw-r--r-- | moses/TranslationTask.cpp | 23 | ||||
-rw-r--r-- | moses/TranslationTask.h | 9 | ||||
-rw-r--r-- | phrase-extract/Jamfile | 2 |
18 files changed, 84 insertions, 85 deletions
diff --git a/OnDiskPt/Jamfile b/OnDiskPt/Jamfile index 473f14cfe..0c25d6275 100644 --- a/OnDiskPt/Jamfile +++ b/OnDiskPt/Jamfile @@ -1,5 +1,5 @@ fakelib OnDiskPt : OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp OnDiskQuery.cpp ../moses//headers ; -exe CreateOnDiskPt : Main.cpp ../moses//moses OnDiskPt ; -exe queryOnDiskPt : queryOnDiskPt.cpp ../moses//moses OnDiskPt ; +exe CreateOnDiskPt : Main.cpp ..//boost_filesystem ../moses//moses OnDiskPt ; +exe queryOnDiskPt : queryOnDiskPt.cpp ..//boost_filesystem ../moses//moses OnDiskPt ; diff --git a/misc/Jamfile b/misc/Jamfile index 81fcb7043..8cc7aa9a8 100644 --- a/misc/Jamfile +++ b/misc/Jamfile @@ -1,24 +1,24 @@ -exe processPhraseTable : GenerateTuples.cpp processPhraseTable.cpp ../moses//moses ; +exe processPhraseTable : GenerateTuples.cpp processPhraseTable.cpp ..//boost_filesystem ../moses//moses ; -exe processLexicalTable : processLexicalTable.cpp ../moses//moses ; +exe processLexicalTable : processLexicalTable.cpp ..//boost_filesystem ../moses//moses ; -exe queryPhraseTable : queryPhraseTable.cpp ../moses//moses ; +exe queryPhraseTable : queryPhraseTable.cpp ..//boost_filesystem ../moses//moses ; -exe queryLexicalTable : queryLexicalTable.cpp ../moses//moses ; +exe queryLexicalTable : queryLexicalTable.cpp ..//boost_filesystem ../moses//moses ; -exe generateSequences : GenerateSequences.cpp ../moses//moses ; +exe generateSequences : GenerateSequences.cpp ..//boost_filesystem ../moses//moses ; -exe TMining : TransliterationMining.cpp ../moses//moses ; +exe TMining : TransliterationMining.cpp ..//boost_filesystem ../moses//moses ; -exe 1-1-Extraction : 1-1-Extraction.cpp ../moses//moses ; +exe 1-1-Extraction : 1-1-Extraction.cpp ..//boost_filesystem ../moses//moses ; -exe prunePhraseTable : prunePhraseTable.cpp ../moses//moses ..//boost_program_options ; +exe prunePhraseTable : prunePhraseTable.cpp ..//boost_filesystem ../moses//moses ..//boost_program_options ; local with-cmph = [ option.get "with-cmph" ] ; if $(with-cmph) { - exe processPhraseTableMin : processPhraseTableMin.cpp ../moses//moses ; - exe processLexicalTableMin : processLexicalTableMin.cpp ../moses//moses ; - exe queryPhraseTableMin : queryPhraseTableMin.cpp ../moses//moses ; + exe processPhraseTableMin : processPhraseTableMin.cpp ..//boost_filesystem ../moses//moses ; + exe processLexicalTableMin : processLexicalTableMin.cpp ..//boost_filesystem ../moses//moses ; + exe queryPhraseTableMin : queryPhraseTableMin.cpp ..//boost_filesystem ../moses//moses ; alias programsMin : processPhraseTableMin processLexicalTableMin queryPhraseTableMin ; # alias programsMin : processPhraseTableMin processLexicalTableMin ; @@ -29,8 +29,8 @@ else { if [ option.get "with-probing-pt" : : "yes" ] { - exe CreateProbingPT : CreateProbingPT.cpp ../moses//moses ; - exe QueryProbingPT : QueryProbingPT.cpp ../moses//moses ; + exe CreateProbingPT : CreateProbingPT.cpp ..//boost_filesystem ../moses//moses ; + exe QueryProbingPT : QueryProbingPT.cpp ..//boost_filesystem ../moses//moses ; alias programsProbing : CreateProbingPT QueryProbingPT ; } diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index 1c57cb33d..03b3a5054 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -36,7 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "moses/IOWrapper.h" #include "moses/Hypothesis.h" -#include "moses/HypergraphOutput.h" #include "moses/Manager.h" #include "moses/StaticData.h" #include "moses/TypeDef.h" @@ -139,18 +138,6 @@ int main(int argc, char** argv) TRACE_ERR("\n"); } - boost::shared_ptr<HypergraphOutput<Manager> > hypergraphOutput; - boost::shared_ptr<HypergraphOutput<ChartManager> > hypergraphOutputChart; - - if (staticData.GetOutputSearchGraphHypergraph()) { - if (staticData.IsChart()) { - hypergraphOutputChart.reset(new HypergraphOutput<ChartManager>(PRECISION)); - } - else { - hypergraphOutput.reset(new HypergraphOutput<Manager>(PRECISION)); - } - } - #ifdef WITH_THREADS ThreadPool pool(staticData.ThreadCount()); #endif @@ -170,12 +157,11 @@ int main(int argc, char** argv) TranslationTask* task; if (staticData.IsChart()) { // scfg - task = new TranslationTask(source, *ioWrapper, hypergraphOutputChart); + task = new TranslationTask(source, *ioWrapper, 2); } else { // pb - task = new TranslationTask(source, *ioWrapper, - hypergraphOutput); + task = new TranslationTask(source, *ioWrapper, 1); } // execute task diff --git a/moses/BaseManager.h b/moses/BaseManager.h index 27a9ee39f..f3869f6b2 100644 --- a/moses/BaseManager.h +++ b/moses/BaseManager.h @@ -3,6 +3,7 @@ #include <iostream> #include <string> #include "ScoreComponentCollection.h" +#include "InputType.h" namespace Moses { @@ -13,6 +14,11 @@ class OutputCollector; class BaseManager { protected: + const InputType &m_source; /**< source sentence to be translated */ + + BaseManager(const InputType &source) + :m_source(source) + {} // output typedef std::vector<std::pair<Moses::Word, Moses::WordsRange> > ApplicationContext; @@ -46,6 +52,11 @@ protected: } public: + //! the input sentence being decoded + const InputType& GetSource() const { + return m_source; + } + virtual void Decode() = 0; // outputs virtual void OutputNBest(OutputCollector *collector) const = 0; @@ -56,6 +67,7 @@ public: virtual void OutputWordGraph(OutputCollector *collector) const = 0; virtual void OutputSearchGraph(OutputCollector *collector) const = 0; virtual void OutputSearchGraphSLF() const = 0; + virtual void OutputSearchGraphHypergraph() const = 0; }; diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index f6f5f341c..568920b27 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -33,6 +33,7 @@ #include "moses/FF/WordPenaltyProducer.h" #include "moses/OutputCollector.h" #include "moses/ChartKBestExtractor.h" +#include "moses/HypergraphOutput.h" using namespace std; @@ -45,7 +46,7 @@ extern bool g_mosesDebug; * \param system which particular set of models to use. */ ChartManager::ChartManager(InputType const& source) - :m_source(source) + :BaseManager(source) ,m_hypoStackColl(source, *this) ,m_start(clock()) ,m_hypothesisId(0) @@ -797,4 +798,13 @@ void ChartManager::OutputDetailedAllTranslationReport( collector->Write(translationId, out.str()); } +void ChartManager::OutputSearchGraphHypergraph() const +{ + const StaticData &staticData = StaticData::Instance(); + if (staticData.GetOutputSearchGraphHypergraph()) { + HypergraphOutput<ChartManager> hypergraphOutputChart(PRECISION); + hypergraphOutputChart.Write(*this); + } +} + } // namespace Moses diff --git a/moses/ChartManager.h b/moses/ChartManager.h index b2ee3d0a9..a4f27750e 100644 --- a/moses/ChartManager.h +++ b/moses/ChartManager.h @@ -25,7 +25,6 @@ #include <boost/unordered_map.hpp> #include "ChartCell.h" #include "ChartCellCollection.h" -#include "InputType.h" #include "WordsRange.h" #include "SentenceStats.h" #include "ChartTranslationOptionList.h" @@ -47,7 +46,6 @@ class ChartSearchGraphWriter; class ChartManager : public BaseManager { private: - InputType const& m_source; /**< source sentence to be translated */ ChartCellCollection m_hypoStackColl; std::auto_ptr<SentenceStats> m_sentenceStats; clock_t m_start; /**< starting time, used for logging */ @@ -116,12 +114,6 @@ public: /** Output in (modified) Kenneth hypergraph format */ void OutputSearchGraphAsHypergraph(std::ostream &outputSearchGraphStream) const; - - //! the input sentence being decoded - const InputType& GetSource() const { - return m_source; - } - //! debug data collected when decoding sentence SentenceStats& GetSentenceStats() const { return *m_sentenceStats; @@ -163,6 +155,7 @@ public: void OutputSearchGraph(OutputCollector *collector) const; void OutputSearchGraphSLF() const {} + void OutputSearchGraphHypergraph() const; }; diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index d77d249e7..7f6530e00 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -47,7 +47,7 @@ ObjectPool<Hypothesis> Hypothesis::s_objectPool("Hypothesis", 300000); Hypothesis::Hypothesis(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt) : m_prevHypo(NULL) - , m_sourceCompleted(source.GetSize(), manager.m_source.m_sourceCompleted) + , m_sourceCompleted(source.GetSize(), manager.GetSource().m_sourceCompleted) , m_sourceInput(source) , m_currSourceWordsRange( m_sourceCompleted.GetFirstGapPos()>0 ? 0 : NOT_FOUND, diff --git a/moses/Incremental.cpp b/moses/Incremental.cpp index 91663d7de..51806656c 100644 --- a/moses/Incremental.cpp +++ b/moses/Incremental.cpp @@ -204,7 +204,7 @@ struct ChartCellBaseFactory { } // namespace Manager::Manager(const InputType &source) : - source_(source), + BaseManager(source), cells_(source, ChartCellBaseFactory()), parser_(source, cells_), n_best_(search::NBestConfig(StaticData::Instance().GetNBestSize())) {} @@ -221,7 +221,7 @@ template <class Model, class Best> search::History Manager::PopulateBest(const M search::Config config(abstract.GetWeight() * M_LN10, data.GetCubePruningPopLimit(), search::NBestConfig(data.GetNBestSize())); search::Context<Model> context(config, model); - size_t size = source_.GetSize(); + size_t size = m_source.GetSize(); boost::object_pool<search::Vertex> vertex_pool(std::max<size_t>(size * size / 2, 32)); for (int startPos = size-1; startPos >= 0; --startPos) { @@ -289,7 +289,7 @@ void Manager::OutputNBest(OutputCollector *collector) const return; } - OutputNBestList(collector, *completed_nbest_, source_.GetTranslationId()); + OutputNBestList(collector, *completed_nbest_, m_source.GetTranslationId()); } void Manager::OutputNBestList(OutputCollector *collector, const std::vector<search::Applied> &nbest, long translationId) const @@ -329,8 +329,8 @@ void Manager::OutputDetailedTranslationReport(OutputCollector *collector) const const search::Applied &applied = completed_nbest_->at(0); OutputDetailedTranslationReport(collector, &applied, - static_cast<const Sentence&>(source_), - source_.GetTranslationId()); + static_cast<const Sentence&>(m_source), + m_source.GetTranslationId()); } } @@ -422,8 +422,8 @@ void Manager::OutputDetailedTreeFragmentsTranslationReport(OutputCollector *coll } const search::Applied *applied = &Completed()[0]; - const Sentence &sentence = dynamic_cast<const Sentence &>(source_); - const size_t translationId = source_.GetTranslationId(); + const Sentence &sentence = dynamic_cast<const Sentence &>(m_source); + const size_t translationId = m_source.GetTranslationId(); std::ostringstream out; ApplicationContext applicationContext; diff --git a/moses/Incremental.h b/moses/Incremental.h index c856f6a93..1115884ee 100644 --- a/moses/Incremental.h +++ b/moses/Incremental.h @@ -54,12 +54,13 @@ public: {} void OutputSearchGraphSLF() const {} + void OutputSearchGraphHypergraph() const + {} private: template <class Model, class Best> search::History PopulateBest(const Model &model, const std::vector<lm::WordIndex> &words, Best &out); - const InputType &source_; ChartCellCollectionBase cells_; ChartParser parser_; diff --git a/moses/Jamfile b/moses/Jamfile index 3be041e60..74d962d41 100644 --- a/moses/Jamfile +++ b/moses/Jamfile @@ -89,7 +89,7 @@ lib moses : headers FF_Factory.o LM//LM TranslationModel/CompactPT//CompactPT TranslationModel/ProbingPT//ProbingPT synlm ThreadPool ..//search ../util/double-conversion//double-conversion ..//z ../OnDiskPt//OnDiskPt -$(TOP)//boost_iostreams mmlib +$(TOP)//boost_filesystem $(TOP)//boost_iostreams mmlib : <threading>single:<source>../util//rt ; @@ -99,5 +99,5 @@ alias headers-to-install : [ glob-tree *.h ] ; import testing ; -unit-test moses_test : [ glob *Test.cpp Mock*.cpp FF/*Test.cpp ] moses headers ..//z ../OnDiskPt//OnDiskPt ..//boost_unit_test_framework ; +unit-test moses_test : [ glob *Test.cpp Mock*.cpp FF/*Test.cpp ] ..//boost_filesystem moses headers ..//z ../OnDiskPt//OnDiskPt ..//boost_unit_test_framework ; diff --git a/moses/Manager.cpp b/moses/Manager.cpp index e04c58c66..f061ea640 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -44,6 +44,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "moses/LM/Base.h" #include "moses/TranslationModel/PhraseDictionary.h" #include "moses/TranslationAnalysis.h" +#include "moses/HypergraphOutput.h" #ifdef HAVE_PROTOBUF #include "hypergraph.pb.h" @@ -57,11 +58,11 @@ using namespace std; namespace Moses { Manager::Manager(InputType const& source, SearchAlgorithm searchAlgorithm) - :m_transOptColl(source.CreateTranslationOptionCollection()) + :BaseManager(source) + ,m_transOptColl(source.CreateTranslationOptionCollection()) ,m_search(Search::CreateSearch(*this, source, searchAlgorithm, *m_transOptColl)) ,interrupted_flag(0) ,m_hypoId(0) - ,m_source(source) { StaticData::Instance().InitializeForInput(m_source); } @@ -1810,4 +1811,13 @@ void Manager::OutputSearchGraphSLF() const } +void Manager::OutputSearchGraphHypergraph() const +{ + const StaticData &staticData = StaticData::Instance(); + if (staticData.GetOutputSearchGraphHypergraph()) { + HypergraphOutput<Manager> hypergraphOutput(PRECISION); + hypergraphOutput.Write(*this); + } +} + } // namespace diff --git a/moses/Manager.h b/moses/Manager.h index 25fbed12d..8e948c9c2 100644 --- a/moses/Manager.h +++ b/moses/Manager.h @@ -111,7 +111,6 @@ private: protected: // data -// InputType const& m_source; /**< source sentence to be translated */ TranslationOptionCollection *m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */ Search *m_search; @@ -146,7 +145,6 @@ protected: void OutputWordGraph(std::ostream &outputWordGraphStream, const Hypothesis *hypo, size_t &linkId) const; public: - InputType const& m_source; /**< source sentence to be translated */ Manager(InputType const& source, SearchAlgorithm searchAlgorithm); ~Manager(); const TranslationOptionCollection* getSntTranslationOptions(); @@ -199,6 +197,7 @@ public: void OutputWordGraph(OutputCollector *collector) const; void OutputSearchGraph(OutputCollector *collector) const; void OutputSearchGraphSLF() const; + void OutputSearchGraphHypergraph() const; }; diff --git a/moses/Syntax/S2T/Manager-inl.h b/moses/Syntax/S2T/Manager-inl.h index 9df717edc..3351d1a9f 100644 --- a/moses/Syntax/S2T/Manager-inl.h +++ b/moses/Syntax/S2T/Manager-inl.h @@ -30,7 +30,7 @@ namespace S2T template<typename Parser> Manager<Parser>::Manager(const InputType &source) - : m_source(source) + : BaseManager(source) , m_pchart(source.GetSize(), Parser::RequiresCompressedChart()) , m_schart(source.GetSize()) { diff --git a/moses/Syntax/S2T/Manager.h b/moses/Syntax/S2T/Manager.h index 71d2081e1..096e3c142 100644 --- a/moses/Syntax/S2T/Manager.h +++ b/moses/Syntax/S2T/Manager.h @@ -58,6 +58,8 @@ class Manager : public BaseManager {} void OutputSearchGraphSLF() const {} + void OutputSearchGraphHypergraph() const + {} private: void FindOovs(const PChart &, std::set<Word> &, std::size_t); @@ -70,7 +72,6 @@ class Manager : public BaseManager void PrunePChart(const SChart::Cell &, PChart::Cell &); - const InputType &m_source; PChart m_pchart; SChart m_schart; std::set<Word> m_oovs; diff --git a/moses/TranslationModel/UG/Jamfile b/moses/TranslationModel/UG/Jamfile index 032b729bd..3ac7910b2 100644 --- a/moses/TranslationModel/UG/Jamfile +++ b/moses/TranslationModel/UG/Jamfile @@ -3,6 +3,7 @@ try-align.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -15,6 +16,7 @@ $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)/moses/TranslationModel/UG/generic//stringdist $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -26,6 +28,7 @@ ptable-describe-features.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -37,6 +40,7 @@ count-ptable-features.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -48,6 +52,7 @@ ptable-lookup.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -59,6 +64,7 @@ sim-pe.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -70,6 +76,7 @@ spe-check-coverage.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -81,6 +88,7 @@ spe-check-coverage2.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt @@ -92,6 +100,7 @@ spe-check-coverage3.cc $(TOP)/moses//moses $(TOP)/moses/TranslationModel/UG/generic//generic $(TOP)//boost_iostreams +$(TOP)//boost_filesystem $(TOP)//boost_program_options $(TOP)/moses/TranslationModel/UG/mm//mm $(TOP)/moses/TranslationModel/UG//mmsapt diff --git a/moses/TranslationTask.cpp b/moses/TranslationTask.cpp index d0f03ed4d..d8b448d44 100644 --- a/moses/TranslationTask.cpp +++ b/moses/TranslationTask.cpp @@ -20,20 +20,10 @@ using namespace std; namespace Moses { -TranslationTask::TranslationTask(InputType* source, Moses::IOWrapper &ioWrapper, - boost::shared_ptr<HypergraphOutput<Manager> > hypergraphOutput) +TranslationTask::TranslationTask(InputType* source, Moses::IOWrapper &ioWrapper, int pbOrChart) : m_source(source) , m_ioWrapper(ioWrapper) -, m_hypergraphOutput(hypergraphOutput) -, m_pbOrChart(1) -{} - -TranslationTask::TranslationTask(InputType *source, IOWrapper &ioWrapper, -boost::shared_ptr<HypergraphOutput<ChartManager> > hypergraphOutputChart) -: m_source(source) -, m_ioWrapper(ioWrapper) -, m_hypergraphOutputChart(hypergraphOutputChart) -, m_pbOrChart(2) +, m_pbOrChart(pbOrChart) {} TranslationTask::~TranslationTask() { @@ -96,9 +86,7 @@ void TranslationTask::RunPb() manager.OutputSearchGraphSLF(); // Output search graph in hypergraph format for Kenneth Heafield's lazy hypergraph decoder - if (m_hypergraphOutput.get()) { - m_hypergraphOutput->Write(manager); - } + manager.OutputSearchGraphHypergraph(); additionalReportingTime.stop(); @@ -302,10 +290,7 @@ void TranslationTask::RunChart() UTIL_THROW_IF2(staticData.UseMBR(), "Cannot use MBR"); // Output search graph in hypergraph format for Kenneth Heafield's lazy hypergraph decoder - if (m_hypergraphOutputChart.get()) { - m_hypergraphOutputChart->Write(manager); - } - + manager.OutputSearchGraphHypergraph(); // 1-best const ChartHypothesis *bestHypo = manager.GetBestHypothesis(); diff --git a/moses/TranslationTask.h b/moses/TranslationTask.h index a169f84dd..217ffce00 100644 --- a/moses/TranslationTask.h +++ b/moses/TranslationTask.h @@ -26,11 +26,7 @@ class TranslationTask : public Moses::Task public: - TranslationTask(Moses::InputType* source, Moses::IOWrapper &ioWrapper, - boost::shared_ptr<Moses::HypergraphOutput<Moses::Manager> > hypergraphOutput); - - TranslationTask(Moses::InputType *source, IOWrapper &ioWrapper, - boost::shared_ptr<Moses::HypergraphOutput<Moses::ChartManager> > hypergraphOutputChart); + TranslationTask(Moses::InputType* source, Moses::IOWrapper &ioWrapper, int pbOrChart); ~TranslationTask(); @@ -44,9 +40,6 @@ private: Moses::InputType* m_source; Moses::IOWrapper &m_ioWrapper; - boost::shared_ptr<Moses::HypergraphOutput<Moses::Manager> > m_hypergraphOutput; - boost::shared_ptr<Moses::HypergraphOutput<Moses::ChartManager> > m_hypergraphOutputChart; - void RunPb(); void RunChart(); diff --git a/phrase-extract/Jamfile b/phrase-extract/Jamfile index 7bf63e587..0e35c437c 100644 --- a/phrase-extract/Jamfile +++ b/phrase-extract/Jamfile @@ -4,7 +4,7 @@ for local d in $(most-deps) { obj $(d:B).o : $(d) ; } #and stuff them into an alias. -alias deps : $(most-deps:B).o ..//z ..//boost_iostreams ../moses//moses ../moses//ThreadPool ../moses//Util ../util//kenutil ; +alias deps : $(most-deps:B).o ..//z ..//boost_iostreams ..//boost_filesystem ../moses//moses ../moses//ThreadPool ../moses//Util ../util//kenutil ; #ExtractionPhrasePair.cpp requires that main define some global variables. #Build the mains that do not need these global variables. |