skeleton PT

This commit is contained in:
Hieu Hoang 2013-09-24 22:50:43 +01:00
parent cff36b6638
commit fc4cabce98
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,36 @@
// vim:tabstop=2
#include "SkeletonPT.h"
using namespace std;
namespace Moses
{
SkeletonPT::SkeletonPT(const std::string &line)
: PhraseDictionary("SkeletonPT", line)
{
ReadParameters();
}
void SkeletonPT::GetTargetPhraseCollectionBatch(const InputPathList &phraseDictionaryQueue) const
{
InputPathList::const_iterator iter;
for (iter = phraseDictionaryQueue.begin(); iter != phraseDictionaryQueue.end(); ++iter) {
InputPath &inputPath = **iter;
}
}
ChartRuleLookupManager* SkeletonPT::CreateRuleLookupManager(const ChartParser&,
const ChartCellCollectionBase&)
{
}
TO_STRING_BODY(SkeletonPT);
// friend
ostream& operator<<(ostream& out, const SkeletonPT& phraseDict)
{
return out;
}
}

View File

@ -0,0 +1,29 @@
#pragma once
#include "PhraseDictionary.h"
namespace Moses
{
class ChartParser;
class ChartCellCollectionBase;
class ChartRuleLookupManager;
class SkeletonPT : public PhraseDictionary
{
friend std::ostream& operator<<(std::ostream&, const SkeletonPT&);
public:
SkeletonPT(const std::string &line);
// for phrase-based model
void GetTargetPhraseCollectionBatch(const InputPathList &phraseDictionaryQueue) const;
// for syntax/hiero model (CKY+ decoding)
ChartRuleLookupManager* CreateRuleLookupManager(const ChartParser&, const ChartCellCollectionBase&);
TO_STRING();
};
} // namespace Moses