diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index 506193d5b..5bd3a4e2b 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -462,7 +462,7 @@ void Hypothesis::CleanupArcList() */ const StaticData &staticData = StaticData::Instance(); size_t nBestSize = staticData.GetNBestSize(); - bool distinctNBest = staticData.GetDistinctNBest() || staticData.UseMBR() || staticData.GetOutputSearchGraph() || staticData.UseLatticeMBR() ; + bool distinctNBest = staticData.GetDistinctNBest() || staticData.UseMBR() || staticData.GetOutputSearchGraph() || staticData.GetOutputSearchGraphSLF() || staticData.GetOutputSearchGraphHypergraph() || staticData.UseLatticeMBR() ; if (!distinctNBest && m_arcList->size() > nBestSize * 5) { // prune arc list only if there too many arcs diff --git a/moses/Manager.cpp b/moses/Manager.cpp index 21f116f42..0e72d90e6 100644 --- a/moses/Manager.cpp +++ b/moses/Manager.cpp @@ -880,7 +880,7 @@ void Manager::OutputSearchGraphAsHypergraph(long translationId, std::ostream &ou { vector searchGraph; GetSearchGraph(searchGraph); -outputSearchGraphStream << "searchGraph.size() == " << searchGraph.size() << endl; + //outputSearchGraphStream << "searchGraph.size() == " << searchGraph.size() << endl; // long numArcs = 0; long numNodes = 0; @@ -892,7 +892,7 @@ outputSearchGraphStream << "searchGraph.size() == " << searchGraph.size() << end // nodes[0] = 0; //numNodes += 1; for (size_t arcNumber = 0, size=searchGraph.size(); arcNumber < size; ++arcNumber) { -OutputSearchNode(translationId,outputSearchGraphStream,searchGraph[arcNumber]); + //OutputSearchNode(translationId,outputSearchGraphStream,searchGraph[arcNumber]); // Record that this arc ends at this node // numArcs += 1; nodeToLines.insert(pair(numNodes,arcNumber)); @@ -921,7 +921,7 @@ OutputSearchNode(translationId,outputSearchGraphStream,searchGraph[arcNumber]); // numNodes += 1; // Print number of nodes and arcs - outputSearchGraphStream << numNodes << " " << numArcs << "(" << searchGraph.size() << ", " << terminalNodes.size() << ")" << endl; + outputSearchGraphStream << numNodes << " " << numArcs /*<< "(" << searchGraph.size() << ", " << terminalNodes.size() << ")"*/ << endl; // Print node and arc for beginning of sentence // outputSearchGraphStream << 1 << endl; diff --git a/moses/StaticData.h b/moses/StaticData.h index 8a9e65162..ce93a5629 100644 --- a/moses/StaticData.h +++ b/moses/StaticData.h @@ -460,7 +460,7 @@ public: return m_nBestFilePath; } bool IsNBestEnabled() const { - return (!m_nBestFilePath.empty()) || m_mbr || m_useLatticeMBR || m_mira || m_outputSearchGraph || m_useConsensusDecoding || !m_latticeSamplesFilePath.empty() + return (!m_nBestFilePath.empty()) || m_mbr || m_useLatticeMBR || m_mira || m_outputSearchGraph || m_outputSearchGraphSLF || m_outputSearchGraphHypergraph || m_useConsensusDecoding || !m_latticeSamplesFilePath.empty() #ifdef HAVE_PROTOBUF || m_outputSearchGraphPB #endif