mosesdecoder/contrib/other-builds/moses2/Weights.cpp

44 lines
754 B
C++
Raw Normal View History

2015-10-24 16:36:30 +03:00
/*
* Weights.cpp
*
* Created on: 24 Oct 2015
* Author: hieu
*/
2015-10-27 20:35:42 +03:00
#include <cassert>
#include <string>
#include <vector>
#include "FeatureFunctions.h"
2015-10-24 16:36:30 +03:00
#include "Weights.h"
2015-10-27 20:35:42 +03:00
#include "moses/Util.h"
using namespace std;
2015-10-24 16:36:30 +03:00
Weights::Weights() {
// TODO Auto-generated constructor stub
}
Weights::~Weights() {
// TODO Auto-generated destructor stub
}
2015-10-26 19:32:47 +03:00
std::ostream& operator<<(std::ostream &out, const Weights &obj)
{
return out;
}
2015-10-27 20:35:42 +03:00
void Weights::CreateFromString(const FeatureFunctions &ffs, const std::string &line)
{
std::vector<std::string> toks = Moses::Tokenize(line);
assert(toks.size());
string ffName = toks[0];
assert(ffName.back() == '=');
ffName = ffName.substr(0, ffName.size() - 1);
cerr << "ffName=" << ffName << endl;
}