summaryrefslogtreecommitdiff
path: root/decoder/grammar.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:01:07 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 02:01:07 +0000
commit2d6a5896df99904b0c492e77168489636d545869 (patch)
treebebf9b97cddbee40a95c026d1608c0cccf6bb49f /decoder/grammar.cc
parent77c25d9f30f95ccb7843f9dce71a4f4e018cc727 (diff)
vest: combine over-similar search directions, exclude primary directions, skeleton for oracle directions
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@227 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/grammar.cc')
-rw-r--r--decoder/grammar.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/decoder/grammar.cc b/decoder/grammar.cc
index 5eb7887d..499e79fe 100644
--- a/decoder/grammar.cc
+++ b/decoder/grammar.cc
@@ -71,7 +71,7 @@ struct TGImpl {
};
TextGrammar::TextGrammar() : max_span_(10), pimpl_(new TGImpl) {}
-TextGrammar::TextGrammar(const string& file) :
+TextGrammar::TextGrammar(const string& file) :
max_span_(10),
pimpl_(new TGImpl) {
ReadFromFile(file);
@@ -104,7 +104,7 @@ void TextGrammar::ReadFromFile(const string& filename) {
RuleLexer::ReadRules(in.stream(), &AddRuleHelper, this);
}
-bool TextGrammar::HasRuleForSpan(int i, int j, int distance) const {
+bool TextGrammar::HasRuleForSpan(int /* i */, int /* j */, int distance) const {
return (max_span_ >= distance);
}
@@ -121,8 +121,7 @@ GlueGrammar::GlueGrammar(const string& goal_nt, const string& default_nt) {
//cerr << "GLUE: " << glue->AsString() << endl;
}
-bool GlueGrammar::HasRuleForSpan(int i, int j, int distance) const {
- (void) j;
+bool GlueGrammar::HasRuleForSpan(int i, int /* j */, int /* distance */) const {
return (i == 0);
}
@@ -141,7 +140,7 @@ PassThroughGrammar::PassThroughGrammar(const Lattice& input, const string& cat)
}
}
-bool PassThroughGrammar::HasRuleForSpan(int i, int j, int distance) const {
+bool PassThroughGrammar::HasRuleForSpan(int i, int j, int /* distance */) const {
const set<int>& hr = has_rule_[i];
if (i == j) { return !hr.empty(); }
return (hr.find(j) != hr.end());