delete create-ini

This commit is contained in:
Hieu Hoang 2013-05-28 13:11:37 +01:00
parent bfaca78b12
commit 0580e2bd11
3 changed files with 12 additions and 26 deletions

View File

@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "moses/TranslationModel/CompactPT/PhraseDictionaryCompact.h"
#include "moses/TranslationModel/PhraseDictionaryMultiModel.h"
#include "moses/TranslationModel/PhraseDictionaryMultiModelCounts.h"
#include "moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h"
#include "DecodeStepTranslation.h"
#include "DecodeStepGeneration.h"
#include "GenerationDictionary.h"
@ -708,6 +709,12 @@ bool StaticData::LoadData(Parameter *parameter)
SetWeights(model, weights);
m_phraseDictionary.push_back(model);
}
else if (feature == "PhraseDictionaryALSuffixArray") {
PhraseDictionaryALSuffixArray* model = new PhraseDictionaryALSuffixArray(line);
vector<float> weights = m_parameter->GetWeights(model->GetScoreProducerDescription());
SetWeights(model, weights);
m_phraseDictionary.push_back(model);
}
#ifdef HAVE_SYNLM
else if (feature == "SyntacticLanguageModel") {

View File

@ -20,27 +20,13 @@ using namespace std;
namespace Moses
{
bool PhraseDictionaryALSuffixArray::Load(const std::vector<FactorType> &input
, const std::vector<FactorType> &output
, const std::string &filePath
, size_t tableLimit)
PhraseDictionaryALSuffixArray::PhraseDictionaryALSuffixArray(const std::string &line)
: PhraseDictionaryMemory("PhraseDictionaryALSuffixArray", line)
{
const StaticData &staticData = StaticData::Instance();
if (staticData.ThreadCount() > 1)
{
UserMessage::Add("Suffix array implementation is not threadsafe");
return false;
if (staticData.ThreadCount() > 1) {
throw runtime_error("Suffix array implementation is not threadsafe");
}
// file path is the directory of the rules for eacg, NOT the file of all the rules
//SetFilePath(filePath);
m_tableLimit = tableLimit;
m_input = &input;
m_output = &output;
return true;
}
void PhraseDictionaryALSuffixArray::InitializeForInput(InputType const& source)

View File

@ -21,14 +21,7 @@ namespace Moses {
class PhraseDictionaryALSuffixArray : public PhraseDictionaryMemory
{
public:
PhraseDictionaryALSuffixArray(const std::string &line)
: PhraseDictionaryMemory("PhraseDictionaryALSuffixArray", line)
{}
bool Load(const std::vector<FactorType> &input
, const std::vector<FactorType> &output
, const std::string &filePath
, size_t tableLimit);
PhraseDictionaryALSuffixArray(const std::string &line);
void InitializeForInput(InputType const& source);