update create-ini file. PhraseModel now split into different implementations

This commit is contained in:
Hieu Hoang 2013-03-04 14:46:59 +00:00
parent 750a63615b
commit 89adb66a7d
2 changed files with 11 additions and 4 deletions

View File

@ -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;

View File

@ -9,7 +9,6 @@ class PT : public FF
{
static int s_index;
int implementation;
float GetWeight() const
{ return 0.2; }