mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
create-ini.cpp
This commit is contained in:
parent
e4876599d2
commit
54f7c45f45
@ -8,8 +8,6 @@ exe queryLexicalTable : queryLexicalTable.cpp ../moses//moses ;
|
||||
|
||||
exe reuse-weights : reuse-weights.cpp ../moses//moses ;
|
||||
|
||||
exe create-ini : create-ini.cpp ../moses//moses ;
|
||||
|
||||
local with-cmph = [ option.get "with-cmph" ] ;
|
||||
if $(with-cmph) {
|
||||
exe processPhraseTableMin : processPhraseTableMin.cpp ../moses//moses ;
|
||||
@ -23,4 +21,4 @@ else {
|
||||
alias programsMin ;
|
||||
}
|
||||
|
||||
alias programs : processPhraseTable processLexicalTable queryPhraseTable queryLexicalTable programsMin reuse-weights create-ini ;
|
||||
alias programs : processPhraseTable processLexicalTable queryPhraseTable queryLexicalTable programsMin reuse-weights create-ini//create-ini ;
|
||||
|
3
misc/create-ini/Jamfile
Normal file
3
misc/create-ini/Jamfile
Normal file
@ -0,0 +1,3 @@
|
||||
exe create-ini : FF.cpp LM.cpp PT.cpp RO.cpp Main.cpp ;
|
||||
|
||||
|
@ -7,8 +7,7 @@ void PT::Output(std::ostream &out) const
|
||||
out << name << index
|
||||
<< " implementation=" << 0
|
||||
<< " num-features=" << numFeatures
|
||||
<< " path=" << path << " ";
|
||||
|
||||
<< " path=" << path;
|
||||
|
||||
out << " input-factor=";
|
||||
Output(out, inFactor);
|
||||
|
@ -12,7 +12,7 @@ class RO : public FF
|
||||
|
||||
void Output(std::ostream &out) const
|
||||
{
|
||||
out << name << index << " "
|
||||
out << name << index
|
||||
<< " path=" << path
|
||||
<< std::endl;
|
||||
}
|
||||
|
@ -759,13 +759,6 @@ bool Parameter::Validate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// required parameters
|
||||
if (m_setting["ttable-file"].size() == 0) {
|
||||
UserMessage::Add("No phrase translation table (ttable-file)");
|
||||
noErrorFlag = false;
|
||||
}
|
||||
|
||||
if (m_setting["lmodel-dub"].size() > 0) {
|
||||
if (m_setting["lmodel-file"].size() != m_setting["lmodel-dub"].size()) {
|
||||
stringstream errorMsg("");
|
||||
|
@ -533,7 +533,11 @@ bool StaticData::LoadData(Parameter *parameter)
|
||||
|
||||
const vector<string> &features = m_parameter->GetParam("feature");
|
||||
for (size_t i = 0; i < features.size(); ++i) {
|
||||
const string &line = features[i];
|
||||
const string &line = Trim(features[i]);
|
||||
cerr << "line=" << line << endl;
|
||||
if (line.empty())
|
||||
continue;
|
||||
|
||||
vector<string> toks = Tokenize(line);
|
||||
|
||||
const string &feature = toks[0];
|
||||
@ -650,7 +654,7 @@ bool StaticData::LoadData(Parameter *parameter)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
UserMessage::Add("Unknown feature function");
|
||||
UserMessage::Add("Unknown feature function:" + feature);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user