mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +03:00
extract lex probability from gzip files
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4321 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
8f0c841d28
commit
ea4db80473
@ -13,8 +13,8 @@ extract: tables-core.o SentenceAlignment.o extract.o
|
||||
extract-rules: tables-core.o SentenceAlignment.o SentenceAlignmentWithSyntax.o SyntaxTree.o XmlTree.o HoleCollection.o extract-rules.o ExtractedRule.o
|
||||
$(CXX) $^ -o extract-rules
|
||||
|
||||
extract-lex: extract-lex.o
|
||||
$(CXX) $^ -o extract-lex
|
||||
extract-lex: extract-lex.o InputFileStream.o
|
||||
$(CXX) $^ -lz -o extract-lex
|
||||
|
||||
score: tables-core.o AlignmentPhrase.o score.o PhraseAlignment.o InputFileStream.o
|
||||
$(CXX) $^ -lz -o score
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include "extract-lex.h"
|
||||
#include "InputFileStream.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -25,12 +26,9 @@ int main(int argc, char* argv[])
|
||||
char* &filePathLexS2T = argv[4];
|
||||
char* &filePathLexT2S = argv[5];
|
||||
|
||||
ifstream streamTarget;
|
||||
ifstream streamSource;
|
||||
ifstream streamAlign;
|
||||
streamTarget.open(filePathTarget);
|
||||
streamSource.open(filePathSource);
|
||||
streamAlign.open(filePathAlign);
|
||||
Moses::InputFileStream streamTarget(filePathTarget);
|
||||
Moses::InputFileStream streamSource(filePathSource);
|
||||
Moses::InputFileStream streamAlign(filePathAlign);
|
||||
|
||||
ofstream streamLexS2T;
|
||||
ofstream streamLexT2S;
|
||||
@ -73,6 +71,9 @@ int main(int argc, char* argv[])
|
||||
|
||||
extractSingleton.Output(streamLexS2T, streamLexT2S);
|
||||
|
||||
streamTarget.Close();
|
||||
streamSource.Close();
|
||||
streamAlign.Close();
|
||||
streamLexS2T.close();
|
||||
streamLexT2S.close();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user