summaryrefslogtreecommitdiff
path: root/vest
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 02:24:51 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-07 02:24:51 +0000
commitf86133971c2bf97ac53873e28adf05c863c72b49 (patch)
tree009c510b1cfa9b55fded88fa792be094f7cb8324 /vest
parentf9d54fd08e217c7bca19f7c821a64d8ae9d81a2a (diff)
propagation of feature name+debug from factory, return correct features array for fsa ffs
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@486 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'vest')
-rw-r--r--vest/mr_vest_generate_mapper_input.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/vest/mr_vest_generate_mapper_input.cc b/vest/mr_vest_generate_mapper_input.cc
index f1179839..14342a43 100644
--- a/vest/mr_vest_generate_mapper_input.cc
+++ b/vest/mr_vest_generate_mapper_input.cc
@@ -18,15 +18,21 @@
const bool DEBUG_ORACLE=true;
-boost::shared_ptr<FFRegistry> global_ff_registry;
+//TODO: decide on cdec_ff ffs, or just bleumodel - if just bleumodel, then do existing features on serialized hypergraphs remain? weights (origin) is passed to oracle_bleu.h:ComputeOracle
+//void register_feature_functions();
+//FFRegistry ff_registry;
namespace {
+void init_bleumodel() {
+ ff_registry.clear();
+ ff_registry.Register(new FFFactory<BLEUModel>);
+}
+
struct init_ff {
init_ff() {
- global_ff_registry.reset(new FFRegistry);
- global_ff_registry->Register(new FFFactory<BLEUModel>);
+ init_bleumodel();
}
};
-init_ff reg;
+//init_ff reg; // order of initialization? ff_registry may not be init yet. call in Run() instead.
}
using namespace std;
@@ -146,6 +152,8 @@ struct oracle_directions {
}
bool verbose() const { return oracle.verbose; }
void Run() {
+ init_bleumodel();
+// register_feature_functions();
AddPrimaryAndRandomDirections();
AddOracleDirections();
compress_similar(directions,max_similarity,&cerr,true,verbose());