2015-10-24 01:19:31 +03:00
|
|
|
/*
|
|
|
|
* InputPath.h
|
|
|
|
*
|
|
|
|
* Created on: 23 Oct 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INPUTPATH_H_
|
|
|
|
#define INPUTPATH_H_
|
2015-10-26 19:32:47 +03:00
|
|
|
#include <iostream>
|
2015-10-24 15:31:43 +03:00
|
|
|
#include <vector>
|
2015-10-24 01:19:31 +03:00
|
|
|
#include "Phrase.h"
|
2015-10-28 21:26:54 +03:00
|
|
|
#include "TargetPhrases.h"
|
2015-11-11 18:08:47 +03:00
|
|
|
#include "legacy/Range.h"
|
2015-12-10 23:49:30 +03:00
|
|
|
|
|
|
|
namespace Moses2
|
|
|
|
{
|
|
|
|
|
2015-10-26 19:32:47 +03:00
|
|
|
class PhraseTable;
|
2015-10-24 15:31:43 +03:00
|
|
|
|
2015-10-24 01:19:31 +03:00
|
|
|
class InputPath {
|
2015-10-26 19:32:47 +03:00
|
|
|
friend std::ostream& operator<<(std::ostream &, const InputPath &);
|
2015-10-24 01:19:31 +03:00
|
|
|
public:
|
2015-11-06 22:06:41 +03:00
|
|
|
const InputPath *prefixPath;
|
|
|
|
SubPhrase subPhrase;
|
2015-11-11 18:08:47 +03:00
|
|
|
Range range;
|
2016-01-14 00:47:16 +03:00
|
|
|
const TargetPhrases** targetPhrases;
|
2015-10-25 19:35:20 +03:00
|
|
|
|
2016-01-14 00:47:16 +03:00
|
|
|
InputPath(MemPool &pool, const SubPhrase &subPhrase, const Range &range, size_t numPt, const InputPath *prefixPath);
|
2015-11-06 22:06:41 +03:00
|
|
|
virtual ~InputPath();
|
2015-10-25 19:35:20 +03:00
|
|
|
|
2015-12-10 17:06:42 +03:00
|
|
|
void AddTargetPhrases(const PhraseTable &pt, const TargetPhrases *tps);
|
2016-01-13 19:46:23 +03:00
|
|
|
const TargetPhrases *GetTargetPhrases(const PhraseTable &pt) const;
|
2015-10-26 19:14:17 +03:00
|
|
|
|
2015-12-08 19:01:37 +03:00
|
|
|
inline bool IsUsed() const
|
|
|
|
{ return m_isUsed; }
|
2015-11-06 22:06:41 +03:00
|
|
|
|
2015-10-24 01:19:31 +03:00
|
|
|
protected:
|
2015-12-08 19:01:37 +03:00
|
|
|
bool m_isUsed;
|
2015-10-24 01:19:31 +03:00
|
|
|
};
|
|
|
|
|
2015-12-10 23:49:30 +03:00
|
|
|
}
|
|
|
|
|
2015-10-24 01:19:31 +03:00
|
|
|
#endif /* INPUTPATH_H_ */
|