ORIENTATION ModelScoreLR::getType(const StringPiece& s) { if (s.compare("mono") == 0 || s.compare("dright") == 0) { return DRIGHT; } else if (s.compare("swap") == 0 || s.compare("dleft") == 0) { return DLEFT; } else if (s.compare("other") == 0 || s.compare("nomono") == 0) { cerr << "Illegal reordering type used: " << s << " for model type LeftRight. You have to re-run step 5 in order to train such a model." << endl; exit(1); } else { cerr << "Illegal reordering type used: " << s << endl; exit(1); } }
ORIENTATION ModelScoreMonotonicity::getType(const StringPiece& s) { if (s.compare("mono") == 0) { return MONO; } else if (s.compare("swap") == 0 || s.compare("dleft") == 0 || s.compare("dright") == 0 || s.compare("other") == 0 || s.compare("nomono") == 0 ) { return NOMONO; } else { cerr << "Illegal reordering type used: " << s << endl; exit(1); } }
ORIENTATION ModelScore::getType(const StringPiece& s) { if (s.compare("mono") == 0) { return MONO; } else if (s.compare("swap") == 0) { return SWAP; } else if (s.compare("dright") == 0) { return DRIGHT; } else if (s.compare("dleft") == 0) { return DLEFT; } else if (s.compare("other") == 0) { return OTHER; } else if (s.compare("nomono") == 0) { return NOMONO; } else { cerr << "Illegal reordering type used: " << s << endl; exit(1); } }