mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-05 02:22:21 +03:00
45 lines
867 B
C++
45 lines
867 B
C++
/*
|
|
* InputPath.h
|
|
*
|
|
* Created on: 23 Oct 2015
|
|
* Author: hieu
|
|
*/
|
|
|
|
#ifndef INPUTPATH_H_
|
|
#define INPUTPATH_H_
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include "Phrase.h"
|
|
#include "TargetPhrases.h"
|
|
#include "legacy/Range.h"
|
|
|
|
namespace Moses2
|
|
{
|
|
|
|
class PhraseTable;
|
|
|
|
class InputPath {
|
|
friend std::ostream& operator<<(std::ostream &, const InputPath &);
|
|
public:
|
|
const InputPath *prefixPath;
|
|
SubPhrase subPhrase;
|
|
Range range;
|
|
const TargetPhrases** targetPhrases;
|
|
|
|
InputPath(MemPool &pool, const SubPhrase &subPhrase, const Range &range, size_t numPt, const InputPath *prefixPath);
|
|
virtual ~InputPath();
|
|
|
|
void AddTargetPhrases(const PhraseTable &pt, const TargetPhrases *tps);
|
|
const TargetPhrases *GetTargetPhrases(const PhraseTable &pt) const;
|
|
|
|
inline bool IsUsed() const
|
|
{ return m_isUsed; }
|
|
|
|
protected:
|
|
bool m_isUsed;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* INPUTPATH_H_ */
|