summaryrefslogtreecommitdiff
path: root/extools/featurize_grammar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extools/featurize_grammar.cc')
-rw-r--r--extools/featurize_grammar.cc17
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>);