mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 07:07:24 +03:00
update create-ini file. PhraseModel now split into different implementations
This commit is contained in:
parent
750a63615b
commit
89adb66a7d
@ -6,25 +6,33 @@ PT::PT(const std::string &line, int numFeatures, bool isHierarchical)
|
||||
:FF(line)
|
||||
{
|
||||
index = s_index++;
|
||||
name = "PhraseModel";
|
||||
this->numFeatures = numFeatures;
|
||||
path = toks[0];
|
||||
|
||||
inFactors.push_back(0);
|
||||
outFactors.push_back(0);
|
||||
|
||||
int implementation;
|
||||
if (toks.size() > 1)
|
||||
implementation = Scan<int>(toks[1]);
|
||||
else if (isHierarchical)
|
||||
implementation = 6;
|
||||
else
|
||||
implementation = 0;
|
||||
|
||||
switch (implementation)
|
||||
{
|
||||
case 0: name = "PhraseDictionaryMemory"; break;
|
||||
case 1: name = "PhraseDictionaryTreeAdaptor"; break;
|
||||
case 2: name = "PhraseDictionaryOnDisk"; break;
|
||||
case 6: name = "PhraseDictionarySCFG"; break;
|
||||
default:name = "UnknownPtImplementation"; break;
|
||||
}
|
||||
}
|
||||
|
||||
void PT::Output(std::ostream &out) const
|
||||
{
|
||||
out << name
|
||||
<< " implementation=" << implementation
|
||||
out << name << " "
|
||||
<< " num-features=" << numFeatures
|
||||
<< " path=" << path;
|
||||
|
||||
|
@ -9,7 +9,6 @@ class PT : public FF
|
||||
{
|
||||
static int s_index;
|
||||
|
||||
int implementation;
|
||||
|
||||
float GetWeight() const
|
||||
{ return 0.2; }
|
||||
|
Loading…
Reference in New Issue
Block a user