diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-10-05 13:48:01 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-10-05 13:48:01 +0400 |
commit | 125e9a8569037bb1d7a0613bc5dde7cd370bf2c8 (patch) | |
tree | 7dd548e98f22956a401c96cab60b980f535fb6de /phrase-extract/extract-main.cpp | |
parent | 902741681a4979ef4f0d55ee265d1be3fe519ecc (diff) |
add debug argument
Diffstat (limited to 'phrase-extract/extract-main.cpp')
-rw-r--r-- | phrase-extract/extract-main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phrase-extract/extract-main.cpp b/phrase-extract/extract-main.cpp index 0b21eb19a..49e01a50c 100644 --- a/phrase-extract/extract-main.cpp +++ b/phrase-extract/extract-main.cpp @@ -170,6 +170,8 @@ int main(int argc, char* argv[]) exit(1); } options.initInstanceWeightsFile(argv[++i]); + } else if (strcmp(argv[i], "--Debug") == 0) { + options.debug = true; } else if(strcmp(argv[i],"--model") == 0) { if (i+1 >= argc) { cerr << "extract: syntax error, no model's information provided to the option --model " << endl; @@ -719,6 +721,12 @@ void ExtractTask::addPhrase( SentenceAlignment &sentence, int startE, int endE, return; } + if (m_options.debug) { + outextractstr << "sentenceID=" << sentence.sentenceID << " "; + outextractstrInv << "sentenceID=" << sentence.sentenceID << " "; + outextractstrOrientation << "sentenceID=" << sentence.sentenceID << " "; + } + for(int fi=startF; fi<=endF; fi++) { if (m_options.isTranslationFlag()) outextractstr << sentence.source[fi] << " "; if (m_options.isOrientationFlag()) outextractstrOrientation << sentence.source[fi] << " "; |