mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-20 23:58:15 +03:00
delete create-ini
This commit is contained in:
parent
bfaca78b12
commit
0580e2bd11
@ -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") {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user