70 std::cerr <<
"Couldn't properly process tag from: "<< txt << std::endl;
76 std::cerr <<
"Couldn't parse the Standard Transition" << std::endl;
95 std::cerr <<
"Couldn't properly process tag from: "<< txt[1] << std::endl;
101 std::cerr <<
"Couldn't parse Duration Transition" <<std::endl;
107 std::cerr <<
"Couldn't parse Lexical Transition" << std::endl;
124 if (lst.
size() == 0){
131 std::cerr <<
"OUT OF MEMORY\nFile" << __FILE__ <<
"Line:\t"<< __LINE__ << std::endl;
136 std::cerr <<
"Couldn't parse Transition Tag information" << std::endl;
156 std::cerr <<
"Line should contain 2 values (STATE VALUE). Couldn't parse:\n" << txt << std::endl;
164 std::cerr <<
"Tried to create a transition in the model to state named : " <<
stateName <<
" but there is no state with that name. Please check the formatting. \n";
172 std::cerr <<
"Probability value not numeric: " << line[1] << std::endl;
183 std::cerr <<
"Log Probability value not numeric: " << line[1] << std::endl;
203 std::cerr <<
"Couldn't parse the transition STATE information: "<< txt[1] << std::endl;
239 std::cerr <<
"OUT OF MEMORY\nFile" << __FILE__ <<
"Line:\t"<< __LINE__ << std::endl;
243 for(
size_t j=2;j<txt.
size();j++){
248 std::cerr <<
"More than 2 values on the line: " << ln.
stringify() << std::endl;
254 std::cerr <<
"Distribution position value not numeric:\t" << ln[0] << std::endl;
260 std::cerr <<
"Distribution position value not numeric:\t" << ln[0] << std::endl;
291 std::string functionName(
"");
297 if (idx+1 < txt.
size()){
298 functionName=txt[idx+1];
301 std::cerr <<
"Couldn't parse the function name from the Lexical Transition:\n" << txt.
stringify() << std::endl;
309 if (idx+1 < txt.
size()){
317 std::cerr <<
"Couldn't parse the STATE for the Lexical transition:\n" << txt.
stringify() << std::endl;
321 std::cerr <<
"Couldn't parse the Lexical Transition:\n" << txt.
stringify() << std::endl;
327 std::cerr <<
"Lexical transition defined transition to state named : " <<
stateName <<
" However, there doesn't appear to be any state with that name\n";
332 std::vector<track*> tempTracks;
333 for(
size_t i=1;i<line.
size();i++){
336 std::cerr <<
"Lexical Transition tried to add a track named: " << line[i] <<
" . However, there isn't a matching track in the model. Please check to model formatting.\n";
349 std::cerr <<
"OUT OF MEMORY\nFile" << __FILE__ <<
"Line:\t"<< __LINE__ << std::endl;
356 std::vector<int> tempOrder;
361 std::cerr <<
"Unable to locate ORDER: for lexical transition to State Name: " <<
stateName << std::endl;
367 bool containsAmbig=line.
contains(
"AMBIGUOUS");
369 ambIdx=line.
indexOf(
"AMBIGUOUS");
371 for(
size_t i=1;i<ambIdx;i++){
375 std::cerr <<
"Lexical Transition Order is not numeric" << line[i] << std::endl;
383 for(
size_t i=1;i<line.
size();i++){
387 std::cerr <<
"Lexical Transition Order is not numeric" << line[i] << std::endl;
397 if (tempOrder.size() == tempTracks.size()){
398 for(
size_t i=0;i<tempOrder.size();i++){
403 std::cerr <<
"Different number of tracks and orders parsed in LEXICAL TRANSITION to state: " <<
stateName <<
" Check the formatting of the Lexical Transition" << std::endl;
410 if (line.
size()<=ambIdx){
411 std::cerr <<
"No scoring type after AMBIGUOUS label\nAssuming AVG\n";
417 else if (line[ambIdx].compare(
"P(X)")==0)
424 std::cerr <<
"Ambiguous Value couldn't be parsed: "<< line[ambIdx] << std::endl;
430 else if (line[ambIdx].compare(
"LOG")==0){
436 std::cerr <<
"Ambiguous Value couldn't be parsed: "<< line[ambIdx] << std::endl;
447 size_t expectedColumns(1);
448 size_t expectedRows(1);
461 for (
size_t iter = idx; iter< txt.
size();iter++){
464 if (iter==idx && txt[idx][0]==
'@'){
471 if (line[0][0]==
'@'){
477 if (temp.size() != expectedColumns){
478 std::cerr <<
"The following line couldn't be parsed into the required number of columns. Expected Columns: " << expectedColumns <<
"\n The line appears as: " << txt[iter] << std::endl;
485 log_prob->push_back(temp);
488 log_prob->push_back(temp);
490 prob->push_back(temp);
492 else if (valtyp ==
COUNTS){
493 counts->push_back(temp);
495 prob->push_back(temp);
497 log_prob->push_back(temp);
503 if (log_prob->size() != expectedRows){
504 std::cerr <<
" The Lexical table doesn't contain enough rows. Expected Rows: " << expectedRows <<
" \n Please check the Lexical Table and formatting\n";
522 std::string transString;
566 transString+=
"\n\t\tORDER:\t";
578 transString+=
"\tAMBIGUOUS:\t";