diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-24 21:25:05 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-24 21:25:05 +0000 |
commit | 8760b7b41970bfbea6ba124a63633c139331b512 (patch) | |
tree | 3f159995505a275ea92aa5ec2421ab928588668c /extools | |
parent | f216419b6a6eb1afa1c5d1c62d69ea07a67b87b6 (diff) |
compile
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@401 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'extools')
-rw-r--r-- | extools/extractor.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/extools/extractor.cc b/extools/extractor.cc index 71778d49..1eb85f37 100644 --- a/extools/extractor.cc +++ b/extools/extractor.cc @@ -84,7 +84,7 @@ void WriteBasePhraseSpans(const AnnotatedParallelSentence& sentence, cout << TD::GetString(sentence.f) << " ||| " << TD::GetString(sentence.e) << " |||"; for (int it = 0; it < phrases.size(); ++it) { const ParallelSpan& phrase = phrases[it]; - cout << " " << phrase.i1 << "-" << phrase.i2 + cout << " " << phrase.i1 << "-" << phrase.i2 << "-" << phrase.j1 << "-" << phrase.j2; } cout << endl; @@ -146,12 +146,12 @@ void WritePhraseContexts(const AnnotatedParallelSentence& sentence, bool context_s, bool context_t, CountCombiner* o) { vector<WordID> context, context_f; - if (context_t) + if (context_t) { - context.resize(ctx_size * 2 + 1); + context.resize(ctx_size * 2 + 1); context[ctx_size] = kGAP; } - if (context_s) + if (context_s) { context_f.resize(ctx_size * 2 + 1); context_f[ctx_size] = kGAP; @@ -169,7 +169,7 @@ void WritePhraseContexts(const AnnotatedParallelSentence& sentence, if (context_t) { - context.resize(ctx_size * 2 + 1); + context.resize(ctx_size * 2 + 1); for (int i = 0; i < ctx_size && context_t; ++i) { int epos = phrase.j1 - 1 - i; const WordID left_ctx = (epos < 0) ? kBOS : sentence.e[epos]; @@ -385,12 +385,12 @@ int main(int argc, char** argv) { assert(phrase_s || phrase_t); assert(context_s || context_t); - + if(backoff) { for (int i=0;i < num_categories;++i) all_cats.push_back(TD::Convert("X"+boost::lexical_cast<string>(i))); } - + //SimpleRuleWriter o; while(in) { ++line; |