consolidate gzip files

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4077 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2011-07-18 05:08:26 +00:00
parent fd08431e3b
commit 1190b75528
3 changed files with 9 additions and 8 deletions

View File

@ -19,8 +19,8 @@ extract-lex: extract-lex.o
score: tables-core.o AlignmentPhrase.o score.o PhraseAlignment.o InputFileStream.o
$(CXX) $^ -lz -o score
consolidate: consolidate.o tables-core.o
$(CXX) $^ -o consolidate
consolidate: consolidate.o tables-core.o InputFileStream.o
$(CXX) $^ -lz -o consolidate
consolidate-direct: consolidate-direct.o InputFileStream.o
$(CXX) $^ -lz -o consolidate-direct

View File

@ -27,6 +27,7 @@
#include "tables-core.h"
#include "SafeGetline.h"
#include "InputFileStream.h"
#define LINE_MAX_LENGTH 10000
@ -80,16 +81,15 @@ int main(int argc, char* argv[])
void processFiles( char* fileNameDirect, char* fileNameIndirect, char* fileNameConsolidated )
{
// open input files
ifstream fileDirect,fileIndirect;
Moses::InputFileStream fileDirect(fileNameDirect);
Moses::InputFileStream fileIndirect(fileNameIndirect);
fileDirect.open(fileNameDirect);
if (fileDirect.fail()) {
cerr << "ERROR: could not open phrase table file " << fileNameDirect << endl;
exit(1);
}
istream &fileDirectP = fileDirect;
fileIndirect.open(fileNameIndirect);
if (fileIndirect.fail()) {
cerr << "ERROR: could not open phrase table file " << fileNameIndirect << endl;
exit(1);
@ -160,8 +160,8 @@ void processFiles( char* fileNameDirect, char* fileNameIndirect, char* fileNameC
fileConsolidated << endl;
}
fileDirect.close();
fileIndirect.close();
fileDirect.Close();
fileIndirect.Close();
fileConsolidated.close();
}

View File

@ -17,7 +17,8 @@ void fix(std::ostream& stream)
int main(int argc, char* argv[])
{
cerr << "Starting...\n";
assert(argc == 6);
char* &filePathTarget = argv[1];
char* &filePathSource = argv[2];
char* &filePathAlign = argv[3];