Writing out sentence number when printing all derivations

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2954 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
abarun 2010-03-07 08:28:16 +00:00
parent 3434d15cda
commit 86ef292af1
3 changed files with 6 additions and 4 deletions

View File

@ -150,7 +150,7 @@ int main(int argc, char* argv[])
//Print all derivations in search graph
if (staticData.PrintAllDerivations()) {
manager.PrintAllDerivations();
manager.PrintAllDerivations(source->GetTranslationId());
}
// pick best translation (maximum a posteriori decoding)

View File

@ -107,7 +107,7 @@ void Manager::ProcessSentence()
*
*/
void Manager::PrintAllDerivations() const
void Manager::PrintAllDerivations(long translationId ) const
{
const std::vector < HypothesisStack* > &hypoStackColl = m_search->GetHypothesisStacks();
@ -137,7 +137,9 @@ void Manager::PrintAllDerivations() const
assert(path);
const std::vector<const Hypothesis *> &edges = path->GetEdges();
cerr << translationId << " ||| ";
// print the surface factor of the translation
for (int currEdge = (int)edges.size() - 1 ; currEdge >= 0 ; currEdge--)
{

View File

@ -104,7 +104,7 @@ public:
const Hypothesis *GetBestHypothesis() const;
const Hypothesis *GetActualBestHypothesis() const;
void CalcNBest(size_t count, TrellisPathList &ret,bool onlyDistinct=0) const;
void PrintAllDerivations() const;
void PrintAllDerivations(long translationId) const;
void GetWordGraph(long translationId, std::ostream &outputWordGraphStream) const;
#ifdef HAVE_PROTOBUF
void SerializeSearchGraphPB(long translationId, std::ostream& outputStream) const;