From 26235c2770f10fc6975a06fd3a8167cbd23029a9 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 25 Nov 2013 00:14:16 -0500 Subject: remove dead code, add adagrad crf learner --- decoder/hg_cfg.h | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 decoder/hg_cfg.h (limited to 'decoder/hg_cfg.h') diff --git a/decoder/hg_cfg.h b/decoder/hg_cfg.h deleted file mode 100644 index b90aca47..00000000 --- a/decoder/hg_cfg.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef HG_CFG_H -#define HG_CFG_H - -#include "cfg.h" - -class Hypergraph; - -// in case you might want the CFG whether or not you apply FSA models: -struct HgCFG { - 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; - bool have_cfg; - bool have_features; - bool want_features; - void InitCFG(CFG &to) { - to.Init(ih,true,want_features,true); - } - bool binarized; - bool uniqed; - CFG &GetCFG() - { - if (!have_cfg) { - have_cfg=true; - InitCFG(cfg); - } - return cfg; - } - void GiveCFG(CFG &to) { - if (!have_cfg) - InitCFG(to); - else { - cfg.VisitRuleIds(*this); - have_cfg=false; - to.Clear(); - swap(to,cfg); - } - } - void operator()(int ri) const { - } - CFG const& GetCFG() const { - assert(have_cfg); - return cfg; - } -}; - - -#endif -- cgit v1.2.3