⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 processlexicaltable.cpp.svn-base

📁 moses开源的机器翻译系统
💻 SVN-BASE
字号:
#include <iostream>#include <string>#include "Timer.h"#include "InputFileStream.h"#include "LexicalReorderingTable.h"Timer timer;void printHelp(){  std::cerr << "Usage:\n"	"options: \n"	"\t-in  string -- input table file name\n"	"\t-out string -- prefix of binary table files\n"	"If -in is not specified reads from stdin\n"	"\n"; }int main(int argc, char** argv){  std::cerr << "processLexicalTable v0.1 by Konrad Rawlik\n";  std::string inFilePath;  std::string outFilePath("out");  if(1 >= argc){	printHelp();	return 1;  }  for(int i = 1; i < argc; ++i){    std::string arg(argv[i]);    if("-in" == arg && i+1 < argc){      ++i;      inFilePath = argv[i];    } else if("-out" == arg && i+1 < argc){      ++i;      outFilePath = argv[i];    } else {      //somethings wrong... print help	  printHelp();      return 1;    }  }    if(inFilePath.empty()){	std::cerr << "processing stdin to " << outFilePath << ".*\n";	return LexicalReorderingTableTree::Create(std::cin, outFilePath);  } else {	std::cerr << "processing " << inFilePath<< " to " << outFilePath << ".*\n";    InputFileStream file(inFilePath);    return LexicalReorderingTableTree::Create(file, outFilePath);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -