change PhraseDictionaryTreeAdaptor --> PhraseDictionaryBinary

This commit is contained in:
Hieu Hoang 2013-05-14 12:19:55 +01:00
parent d5ebe61791
commit 34df0011a9
5 changed files with 5 additions and 17 deletions

View File

@ -34,7 +34,7 @@ PT::PT(const std::string &line, int numFeatures, bool isHierarchical, const pair
switch (implementation) switch (implementation)
{ {
case 0: name = "PhraseDictionaryMemory"; break; case 0: name = "PhraseDictionaryMemory"; break;
case 1: name = "PhraseDictionaryTreeAdaptor"; break; case 1: name = "PhraseDictionaryBinary"; break;
case 2: name = "PhraseDictionaryOnDisk"; break; case 2: name = "PhraseDictionaryOnDisk"; break;
case 6: name = "PhraseDictionaryMemory"; break; case 6: name = "PhraseDictionaryMemory"; break;
default:name = "UnknownPtImplementation"; break; default:name = "UnknownPtImplementation"; break;

View File

@ -410,7 +410,7 @@ void Parameter::ConvertWeightArgsPhraseModel(const string &oldWeightName)
numInputScores.push_back("1"); numInputScores.push_back("1");
} }
SetWeight("PhraseDictionaryTreeAdaptor", 0, inputWeights); SetWeight("PhraseDictionaryBinary", 0, inputWeights);
} }
// convert actually pt feature // convert actually pt feature
@ -469,7 +469,7 @@ void Parameter::ConvertWeightArgsPhraseModel(const string &oldWeightName)
ptType = "PhraseDictionaryMemory"; ptType = "PhraseDictionaryMemory";
break; break;
case Binary: case Binary:
ptType = "PhraseDictionaryTreeAdaptor"; ptType = "PhraseDictionaryBinary";
break; break;
case OnDisk: case OnDisk:
ptType = "PhraseDictionaryOnDisk"; ptType = "PhraseDictionaryOnDisk";

View File

@ -666,7 +666,7 @@ bool StaticData::LoadData(Parameter *parameter)
SetWeights(model, weights); SetWeights(model, weights);
m_unknownWordPenaltyProducer = model; m_unknownWordPenaltyProducer = model;
} }
else if (feature == "PhraseDictionaryTreeAdaptor") { else if (feature == "PhraseDictionaryBinary") {
PhraseDictionaryTreeAdaptor* model = new PhraseDictionaryTreeAdaptor(line); PhraseDictionaryTreeAdaptor* model = new PhraseDictionaryTreeAdaptor(line);
vector<float> weights = m_parameter->GetWeights(model->GetScoreProducerDescription()); vector<float> weights = m_parameter->GetWeights(model->GetScoreProducerDescription());
SetWeights(model, weights); SetWeights(model, weights);

View File

@ -20,18 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***********************************************************************/ ***********************************************************************/
#include "moses/TranslationModel/PhraseDictionary.h" #include "moses/TranslationModel/PhraseDictionary.h"
#include "moses/TranslationModel/PhraseDictionaryTreeAdaptor.h"
#include "moses/TranslationModel/RuleTable/PhraseDictionarySCFG.h"
#include "moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h"
#include "moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h"
#include "moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.h"
#ifndef WIN32
#include "moses/TranslationModel/PhraseDictionaryDynSuffixArray.h"
#include "moses/TranslationModel/CompactPT/PhraseDictionaryCompact.h"
#endif
#include "moses/TranslationModel/RuleTable/UTrie.h"
#include "moses/StaticData.h" #include "moses/StaticData.h"
#include "moses/InputType.h" #include "moses/InputType.h"
#include "moses/TranslationOption.h" #include "moses/TranslationOption.h"

View File

@ -26,7 +26,7 @@ namespace Moses
PhraseDictionaryTreeAdaptor:: PhraseDictionaryTreeAdaptor::
PhraseDictionaryTreeAdaptor(const std::string &line) PhraseDictionaryTreeAdaptor(const std::string &line)
: PhraseDictionary("PhraseDictionaryTreeAdaptor", line) : PhraseDictionary("PhraseDictionaryBinary", line)
{ {
} }