diff options
author | Patrick Simianer <p@simianer.de> | 2011-09-26 21:51:52 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-09-26 21:51:52 +0200 |
commit | 8bb00a2a2775442418f1cb7c041f7cba5d6e0d42 (patch) | |
tree | 7ac3d9f6941ef1f5142d009c485f2b21c33648de /dtrain/dtrain.h | |
parent | a433961e78a958d25a6d708bfd89e9655d1217c7 (diff) |
got rid of scoring loop
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r-- | dtrain/dtrain.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h index ed75a297..0c27167d 100644 --- a/dtrain/dtrain.h +++ b/dtrain/dtrain.h @@ -7,14 +7,6 @@ #include <boost/algorithm/string.hpp> #include <boost/program_options.hpp> -#include "verbose.h" -#include "viterbi.h" -#include "ff_register.h" -#include "decoder.h" -#include "weights.h" - -#include "score.h" -#include "kbestget.h" #include "ksampler.h" #include "pairsampling.h" @@ -31,27 +23,12 @@ inline void register_and_convert(const vector<string>& strs, vector<WordID>& ids for (it = strs.begin(); it < strs.end(); it++) ids.push_back(TD::Convert(*it)); } + inline ostream& _np(ostream& out) { return out << resetiosflags(ios::showpos); } inline ostream& _p(ostream& out) { return out << setiosflags(ios::showpos); } inline ostream& _p2(ostream& out) { return out << setprecision(2); } inline ostream& _p5(ostream& out) { return out << setprecision(5); } inline ostream& _p9(ostream& out) { return out << setprecision(9); } -inline void strsplit(string &s, vector<string>& v, char d = '\t', unsigned parts = 0) { - stringstream ss(s); - string t; - unsigned i = 0; - while(true) - { - if (parts > 0 && i == parts-1) { - getline(ss, t); - v.push_back(t); - break; - } - if (!getline(ss, t, d)) break; - v.push_back(t); - i++; - } -} #endif |