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
commitaaac9f8ee73ba59b72609af9a78b167312a6dac7 (patch)
tree1273c65f43c124eac220a298acbe7af951b0a83e /vest
parente2ef62dc50b9795fc801f97aba7bac8c80bb7c54 (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());