mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
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:
parent
3434d15cda
commit
86ef292af1
@ -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)
|
||||
|
@ -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--)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user