diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2012-10-08 20:54:59 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2012-10-08 20:54:59 +0400 |
commit | 848aafb64478f843e25a800c57243b38609465ef (patch) | |
tree | be3dce6647a1a300b48ccbd32b36dc65b56c998f /phrase-extract | |
parent | e7e4dbd405e8d29a9a429c6b5eb366a2fe0ecf9a (diff) | |
parent | 2aa10c3012328d8fd66ceee26c25e3d8771f9f31 (diff) |
Merge remote branch 'github/master' into miramerge
Conflicts:
moses/src/AlignmentInfo.cpp
moses/src/AlignmentInfo.h
moses/src/ChartHypothesis.cpp
moses/src/ChartTrellisNode.cpp
moses/src/LM/Implementation.cpp
moses/src/LM/Ken.cpp
moses/src/TargetPhrase.cpp
moses/src/TargetPhrase.h
Diffstat (limited to 'phrase-extract')
-rw-r--r-- | phrase-extract/extract-ghkm/ExtractGHKM.cpp | 5 | ||||
-rw-r--r-- | phrase-extract/extract-ghkm/Options.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/phrase-extract/extract-ghkm/ExtractGHKM.cpp b/phrase-extract/extract-ghkm/ExtractGHKM.cpp index dae876116..94e565085 100644 --- a/phrase-extract/extract-ghkm/ExtractGHKM.cpp +++ b/phrase-extract/extract-ghkm/ExtractGHKM.cpp @@ -90,7 +90,7 @@ int ExtractGHKM::Main(int argc, char *argv[]) std::string alignmentLine; XmlTreeParser xmlTreeParser(labelSet, topLabelSet); ScfgRuleWriter writer(fwdExtractStream, invExtractStream, options); - size_t lineNum = 0; + size_t lineNum = options.sentenceOffset; while (true) { std::getline(targetStream, targetLine); std::getline(sourceStream, sourceLine); @@ -289,6 +289,9 @@ void ExtractGHKM::ProcessOptions(int argc, char *argv[], "extract minimal rules only") ("PCFG", "include score based on PCFG scores in target corpus") + ("SentenceOffset", + po::value(&options.sentenceOffset)->default_value(options.sentenceOffset), + "set sentence number offset if processing split corpus") ("UnknownWordLabel", po::value(&options.unknownWordFile), "write unknown word labels to named file") diff --git a/phrase-extract/extract-ghkm/Options.h b/phrase-extract/extract-ghkm/Options.h index 362fc95d2..acad2040c 100644 --- a/phrase-extract/extract-ghkm/Options.h +++ b/phrase-extract/extract-ghkm/Options.h @@ -38,6 +38,7 @@ struct Options { , maxScope(3) , minimal(false) , pcfg(false) + , sentenceOffset(0) , unpairedExtractFormat(false) {} // Positional options @@ -57,6 +58,7 @@ struct Options { int maxScope; bool minimal; bool pcfg; + int sentenceOffset; bool unpairedExtractFormat; std::string unknownWordFile; }; |