summaryrefslogtreecommitdiff
path: root/decoder/cdec.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 15:12:50 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-09 15:12:50 +0000
commit15a4bf8c8014b7df4847c6e4d0d6863f531179f6 (patch)
treeb7b5f9db002142aa03a625dc2d780b4f6ad3b635 /decoder/cdec.cc
parent31d21ec50cb9689a73ee58617d282741396ca510 (diff)
optional max arity param for Arity_N features (no hardcoded max of N=9); FF::rule_feature() should be true for non-source-span dependent 0-state features.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@196 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cdec.cc')
-rw-r--r--decoder/cdec.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/decoder/cdec.cc b/decoder/cdec.cc
index 079b270b..79d51939 100644
--- a/decoder/cdec.cc
+++ b/decoder/cdec.cc
@@ -390,6 +390,10 @@ int main(int argc, char** argv) {
}
// cerr << "+LM weights: " << FeatureVector(feature_weights)<<endl;
}
+ if (!conf.count("no_freeze_feature_set")) {
+ cerr << "Freezing feature set (use --no_freeze_feature_set to change)." << endl;
+ FD::Freeze(); // this means we can't see the feature names of not-weighted features
+ }
// set up translation back end
if (formalism == "scfg")
@@ -443,10 +447,6 @@ int main(int argc, char** argv) {
ModelSet prelm_models(prelm_feature_weights, prelm_ffs);
if (has_prelm_models)
show_models(conf,prelm_models,"prelm ");
- if (!conf.count("no_freeze_feature_set")) { // this used to happen immediately after loading weights, but now show_models will extend weight vector nicely.
- cerr << "Freezing feature set (use --no_freeze_feature_set to change)." << endl;
- FD::Freeze();
- }
int palg = 1;
if (LowercaseString(str("intersection_strategy",conf)) == "full") {
@@ -518,6 +518,7 @@ int main(int argc, char** argv) {
Timer t("Translation");
const bool translation_successful =
translator->Translate(to_translate, &smeta, feature_weights, &forest);
+ //TODO: modify translator to incorporate all 0-state model scores immediately?
translator->SentenceComplete();
if (!translation_successful) {
cerr << " NO PARSE FOUND.\n";
@@ -550,8 +551,7 @@ int main(int argc, char** argv) {
ApplyModelSet(forest,
smeta,
prelm_models,
- IntersectionConfiguration(exhaustive_t()),
-// avoid overhead of best-first
+ inter_conf, // this is now reduced to exhaustive if all are stateless
&prelm_forest);
forest.swap(prelm_forest);
forest.Reweight(prelm_feature_weights);