std::cerr<<"Phrase constraint currently only works in multiple or union mode. If you really need it for single, put everything on one line and use union."<<std::endl;
return1;
}
boolcmd_is_model=true;
constchar*cmd_input=argv[argc-2];
if(!strncmp(cmd_input,"vocab:",6)){
cmd_is_model=false;
cmd_input+=6;
}elseif(!strncmp(cmd_input,"model:",6)){
cmd_input+=6;
}elseif(strchr(cmd_input,':')){
std::cerr<<"Specify vocab: or model: before the input file name, not "<<cmd_input<<std::endl;
return1;
}else{
std::cerr<<"Assuming that "<<cmd_input<<" is a model file"<<std::endl;
}
std::ifstreamcmd_file;
std::istream*vocab;
if(cmd_is_model){
vocab=&std::cin;
}else{
cmd_file.open(cmd_input,std::ios::in);
UTIL_THROW_IF(!cmd_file,util::ErrnoException,"Failed to open "<<cmd_input);