Update of /cvsroot/robotflow/RobotFlow/Vision/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31054
Modified Files:
ExtractSentence_v2.cc
Log Message:
removed leading spaces
Index: ExtractSentence_v2.cc
===================================================================
RCS file: /cvsroot/robotflow/RobotFlow/Vision/src/ExtractSentence_v2.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ExtractSentence_v2.cc 13 Jun 2005 15:30:28 -0000 1.5
--- ExtractSentence_v2.cc 18 Oct 2005 19:00:41 -0000 1.6
***************
*** 219,229 ****
for (list<vector<vector<float> > >::iterator iter = vect_list.begin(); iter != vect_list.end(); iter++) {
! sentence += find_word((*iter),dict);
! sentence += " ";
}
! original_sentence += "\n";
!
sentence += "\n"; // end of line symbol
}
--- 219,236 ----
for (list<vector<vector<float> > >::iterator iter = vect_list.begin(); iter != vect_list.end(); iter++) {
! string new_word(find_word((*iter),dict));
! if (!new_word.empty()) {
! sentence += new_word;
! sentence += " ";
! }
}
!
! if (!original_sentence.empty()) {
! original_sentence += "\n";
! }
! if (!sentence.empty()) {
sentence += "\n"; // end of line symbol
+ }
}
***************
*** 344,348 ****
//discard words will too small prob
if (pow(best_prob,1.0f/prob.size()) < m_minDictScore)
! return string("?");
//return best hit
--- 351,355 ----
//discard words will too small prob
if (pow(best_prob,1.0f/prob.size()) < m_minDictScore)
! return string();
//return best hit
***************
*** 369,373 ****
number += '0'+best_id;
}
! }
return number;
}
--- 376,380 ----
number += '0'+best_id;
}
! }
return number;
}
|