mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
skeleton PT
This commit is contained in:
parent
cff36b6638
commit
fc4cabce98
36
moses/TranslationModel/SkeletonPT.cpp
Normal file
36
moses/TranslationModel/SkeletonPT.cpp
Normal 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;
|
||||
}
|
||||
|
||||
}
|
29
moses/TranslationModel/SkeletonPT.h
Normal file
29
moses/TranslationModel/SkeletonPT.h
Normal 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
|
Loading…
Reference in New Issue
Block a user