diff options
author | olivia.buzek <olivia.buzek@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-21 20:13:27 +0000 |
---|---|---|
committer | olivia.buzek <olivia.buzek@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-21 20:13:27 +0000 |
commit | 3aa78648821ec0a1869dba7b77e081ae7b930c0d (patch) | |
tree | ab66cf7ae49d1df8bfa8d9525eb0c364e065e7b0 /extools | |
parent | d66f09f1348f9805149b9eab4940cb9c00742984 (diff) |
Fixing errors.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@361 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'extools')
-rw-r--r-- | extools/featurize_grammar.cc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/extools/featurize_grammar.cc b/extools/featurize_grammar.cc index 5c51fffe..2fc53ff9 100644 --- a/extools/featurize_grammar.cc +++ b/extools/featurize_grammar.cc @@ -306,22 +306,6 @@ struct RulePenalty : public FeatureExtractor { const int fid_; }; -struct BackoffRule : public FeatureExtractor { - BackoffRule() : fid_(FD::Convert("BackoffRule")) {} - - virtual void ExtractFeatures(const WordID lhs, - const vector<WordID>& src, - const vector<WordID>& trg, - const RuleStatistics& /*info*/, - SparseVector<float>* result) const { - (void) lhs; (void) src; (void) trg; - const string& lhstr = TD::Convert(lhs); - if(lhstr.find('_')!=string::npos) - result->set_value(fid_, -1); - } - const int fid_; -}; - // The negative log of the condition rule probs // ignoring the identities of the non-terminals. // i.e. the prob Hiero would assign. @@ -702,7 +686,6 @@ int main(int argc, char** argv){ reg.Register("LexProb", new FEFactory<LexProbExtractor>); reg.Register("XFeatures", new FEFactory<XFeatures>); reg.Register("LabelledRuleConditionals", new FEFactory<LabelledRuleConditionals>); - reg.Register("BackoffRule", new FEFactory<BackoffRule>); reg.Register("RulePenalty", new FEFactory<RulePenalty>); reg.Register("LHSProb", new FEFactory<LHSProb>); reg.Register("LabellingShape", new FEFactory<LabellingShape>); |