summaryrefslogtreecommitdiff
path: root/decoder/hg_cfg.h
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-27 23:52:20 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-27 23:52:20 +0000
commit8ff664a63254c2e64dc296caffc3a0261e2473af (patch)
treeb8b3d8ab07b6fc5228ff3104bc2339efbbf99d70 /decoder/hg_cfg.h
parent1eab70e16f0e0d5531f3babfea2062c82f6362e1 (diff)
still compiles
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@627 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/hg_cfg.h')
-rwxr-xr-xdecoder/hg_cfg.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/decoder/hg_cfg.h b/decoder/hg_cfg.h
index ba936990..b90aca47 100755
--- a/decoder/hg_cfg.h
+++ b/decoder/hg_cfg.h
@@ -7,8 +7,12 @@ class Hypergraph;
// in case you might want the CFG whether or not you apply FSA models:
struct HgCFG {
- HgCFG(Hypergraph const& ih) : ih(ih) {
+ void set_defaults() {
have_cfg=binarized=have_features=uniqed=false;
+ want_features=true;
+ }
+ HgCFG(Hypergraph const& ih) : ih(ih) {
+ set_defaults();
}
Hypergraph const& ih;
CFG cfg;
@@ -32,11 +36,14 @@ struct HgCFG {
if (!have_cfg)
InitCFG(to);
else {
+ cfg.VisitRuleIds(*this);
have_cfg=false;
to.Clear();
- to.Swap(cfg);
+ swap(to,cfg);
}
}
+ void operator()(int ri) const {
+ }
CFG const& GetCFG() const {
assert(have_cfg);
return cfg;