mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
debugging
This commit is contained in:
parent
ccdd628d25
commit
0953b5caca
@ -57,6 +57,7 @@ void SearchNormal::ProcessSentence()
|
||||
m_hypoStackColl[0]->AddPrune(hypo);
|
||||
|
||||
// go through each stack
|
||||
size_t stackNo = 0;
|
||||
std::vector < HypothesisStack* >::iterator iterStack;
|
||||
for (iterStack = m_hypoStackColl.begin() ; iterStack != m_hypoStackColl.end() ; ++iterStack) {
|
||||
// check if decoding ran out of time
|
||||
@ -90,9 +91,12 @@ void SearchNormal::ProcessSentence()
|
||||
IFVERBOSE(2) {
|
||||
OutputHypoStackSize();
|
||||
}
|
||||
OutputHypoStack(stackNo);
|
||||
|
||||
// this stack is fully expanded;
|
||||
actual_hypoStack = &sourceHypoColl;
|
||||
|
||||
++stackNo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,4 +385,19 @@ void SearchNormal::OutputHypoStackSize()
|
||||
TRACE_ERR( endl);
|
||||
}
|
||||
|
||||
void SearchNormal::OutputHypoStack(int stack)
|
||||
{
|
||||
if (stack >= 0) {
|
||||
TRACE_ERR( "Stack " << stack << ": " << endl << m_hypoStackColl[stack] << endl);
|
||||
} else {
|
||||
// all stacks
|
||||
int i = 0;
|
||||
vector < HypothesisStack* >::iterator iterStack;
|
||||
for (iterStack = m_hypoStackColl.begin() ; iterStack != m_hypoStackColl.end() ; ++iterStack) {
|
||||
HypothesisStackNormal &hypoColl = *static_cast<HypothesisStackNormal*>(*iterStack);
|
||||
TRACE_ERR( "Stack " << i++ << ": " << endl << hypoColl << endl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user