diff options
| author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-13 06:29:00 +0000 | 
|---|---|---|
| committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-13 06:29:00 +0000 | 
| commit | a15b6133bdb8eee1cdbc67712f3a5e51c4ec5377 (patch) | |
| tree | be3f5f1738b5d5bdc3ad2ac291fbae7f3e318fa1 /extools/featurize_grammar.cc | |
| parent | 84d7b76d0896f9be3a51df3b49d557df0dd3781a (diff) | |
start moving toward striped grammar lexer
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@233 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'extools/featurize_grammar.cc')
| -rw-r--r-- | extools/featurize_grammar.cc | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/extools/featurize_grammar.cc b/extools/featurize_grammar.cc index 27c0dadf..547f390a 100644 --- a/extools/featurize_grammar.cc +++ b/extools/featurize_grammar.cc @@ -21,6 +21,7 @@  #include "tdict.h"  #include "lex_trans_tbl.h"  #include "filelib.h" +#include "striped_grammar.h"  #include <boost/tuple/tuple.hpp>  #include <boost/shared_ptr.hpp> @@ -137,7 +138,6 @@ bool validate_non_terminal(const std::string& s)  namespace {    inline bool IsWhitespace(char c) { return c == ' ' || c == '\t'; } -  inline bool IsBracket(char c){return c == '[' || c == ']';}    inline void SkipWhitespace(const char* buf, int* ptr) {      while (buf[*ptr] && IsWhitespace(buf[*ptr])) { ++(*ptr); }    } @@ -407,7 +407,7 @@ struct BackoffRule : public FeatureExtractor {                                 const RuleStatistics& /*info*/,                                 SparseVector<float>* result) const {      (void) lhs; (void) src; (void) trg; -    string lhstr = TD::Convert(lhs); +    const string& lhstr = TD::Convert(lhs);      if(lhstr.find('_')!=string::npos)          result->set_value(fid_, -1);    } | 
