summaryrefslogtreecommitdiff
path: root/decoder/cdec.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 04:59:59 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-27 04:59:59 +0000
commit25acffeb79a3258d978b7a3168b076f959bfb1bb (patch)
tree5dc16ab1b0be212d2625eef17df78b11477be2a1 /decoder/cdec.cc
parent9f34384f610e512488df4bb0f08e962ad95d6d13 (diff)
sample fsa ffs compile
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@432 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/cdec.cc')
-rw-r--r--decoder/cdec.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/decoder/cdec.cc b/decoder/cdec.cc
index 76551cfa..460e9f15 100644
--- a/decoder/cdec.cc
+++ b/decoder/cdec.cc
@@ -388,6 +388,12 @@ int main(int argc, char** argv) {
exit(1);
}
+ const string input = str("input",conf);
+ cerr << "Reading input from " << ((input == "-") ? "STDIN" : input.c_str()) << endl;
+ ReadFile in_read(input);
+ istream *in = in_read.stream();
+ assert(*in);
+
// load feature weights (and possibly freeze feature set)
vector<double> feature_weights,prelm_feature_weights;
Weights w,prelm_w;
@@ -503,11 +509,6 @@ int main(int argc, char** argv) {
int combine_size = conf["combine_size"].as<int>();
if (combine_size < 1) combine_size = 1;
- const string input = str("input",conf);
- cerr << "Reading input from " << ((input == "-") ? "STDIN" : input.c_str()) << endl;
- ReadFile in_read(input);
- istream *in = in_read.stream();
- assert(*in);
SparseVector<prob_t> acc_vec; // accumulate gradient
double acc_obj = 0; // accumulate objective