summaryrefslogtreecommitdiff
path: root/extools/extract.cc
diff options
context:
space:
mode:
authorolivia.buzek <olivia.buzek@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 22:03:30 +0000
committerolivia.buzek <olivia.buzek@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 22:03:30 +0000
commit6211d023c559f3969ac0a827f4635c5b0959f230 (patch)
tree0033966baa5c3b915439c89a359d7dd17d90c504 /extools/extract.cc
parent261027816caf7676dbb082ce58da086b5f5cb707 (diff)
Fixing backoff grammar.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@214 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'extools/extract.cc')
-rw-r--r--extools/extract.cc19
1 files changed, 6 insertions, 13 deletions
diff --git a/extools/extract.cc b/extools/extract.cc
index c2c413e2..14497089 100644
--- a/extools/extract.cc
+++ b/extools/extract.cc
@@ -283,7 +283,7 @@ void Extract::ExtractConsistentRules(const AnnotatedParallelSentence& sentence,
for (short j = 0; j < cur_es.size(); ++j)
if (cur_es[j] >= 0 && sentence.aligned(cur_fs[i],cur_es[j]))
cur_terminal_align.push_back(make_pair(i,j));
- observer->CountRule(lhs, cur_rhs_f, cur_rhs_e, cur_terminal_align);
+ //observer->CountRule(lhs, cur_rhs_f, cur_rhs_e, cur_terminal_align);
if(!all_cats->empty()) {
//produce the backoff grammar if the category wordIDs are available
@@ -294,7 +294,7 @@ void Extract::ExtractConsistentRules(const AnnotatedParallelSentence& sentence,
nonterm+=bkoff_mrkr;
bkoff = -TD::Convert(nonterm);
cur_rhs_f[i]=bkoff;
- vector<WordID> rhs_f_bkoff;
+ /*vector<WordID> rhs_f_bkoff;
vector<WordID> rhs_e_bkoff;
vector<pair<short,short> > bkoff_align;
bkoff_align.clear();
@@ -307,19 +307,12 @@ void Extract::ExtractConsistentRules(const AnnotatedParallelSentence& sentence,
rhs_e_bkoff.push_back(0);
observer->CountRule(bkoff,rhs_f_bkoff,rhs_e_bkoff,bkoff_align);
- }
- }//else
- //cerr << cur_rhs_f[i] << ": (words,f) |" << TD::Convert(cur_rhs_f[i]) << endl;
+ }*/
+ }
}
- /*for (int i=0; i < cur_rhs_e.size(); ++i)
- if(cur_rhs_e[i] <= 0)
- cerr << cur_rhs_e[i] << ": (cats,e) |" << TD::Convert(1-cur_rhs_e[i]) << endl;
- else
- cerr << cur_rhs_e[i] << ": (words,e) |" << TD::Convert(cur_rhs_e[i]) << endl;
- */
-
+
+ }
observer->CountRule(lhs, cur_rhs_f, cur_rhs_e, cur_terminal_align);
- }
}
}
}