2008-06-11 14:52:57 +04:00
|
|
|
// $Id$
|
2010-02-24 14:15:44 +03:00
|
|
|
#ifndef moses_TranslationOptionCollectionConfusionNet_h
|
|
|
|
#define moses_TranslationOptionCollectionConfusionNet_h
|
2008-06-11 14:52:57 +04:00
|
|
|
|
|
|
|
#include "TranslationOptionCollection.h"
|
2013-07-09 17:19:35 +04:00
|
|
|
#include "InputPath.h"
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2008-10-09 03:51:26 +04:00
|
|
|
namespace Moses
|
|
|
|
{
|
2013-06-21 04:17:17 +04:00
|
|
|
|
|
|
|
class ConfusionNet;
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2012-06-29 02:29:46 +04:00
|
|
|
/** Holds all translation options, for all spans, of a particular confusion network input
|
|
|
|
* Inherited from TranslationOptionCollection.
|
|
|
|
*/
|
2011-02-24 16:14:42 +03:00
|
|
|
class TranslationOptionCollectionConfusionNet : public TranslationOptionCollection
|
|
|
|
{
|
2013-07-09 18:48:36 +04:00
|
|
|
public:
|
2013-08-02 21:24:36 +04:00
|
|
|
typedef std::vector< std::vector<InputPathList> > InputPathMatrix;
|
2013-07-09 18:48:36 +04:00
|
|
|
|
2013-07-09 17:19:35 +04:00
|
|
|
protected:
|
2013-08-02 21:24:36 +04:00
|
|
|
InputPathMatrix m_inputPathMatrix; /*< contains translation options */
|
2013-07-09 17:19:35 +04:00
|
|
|
|
2013-07-09 19:56:49 +04:00
|
|
|
InputPathList &GetInputPathList(size_t startPos, size_t endPos);
|
2015-02-10 04:20:19 +03:00
|
|
|
bool CreateTranslationOptionsForRangeNew(const DecodeGraph &decodeStepList
|
2013-07-11 19:20:15 +04:00
|
|
|
, size_t startPosition
|
|
|
|
, size_t endPosition
|
|
|
|
, bool adhereTableLimit
|
|
|
|
, size_t graphInd);
|
2013-08-06 18:04:57 +04:00
|
|
|
|
2015-02-10 04:20:19 +03:00
|
|
|
bool CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeStepList
|
2013-07-11 19:20:15 +04:00
|
|
|
, size_t startPosition
|
|
|
|
, size_t endPosition
|
|
|
|
, bool adhereTableLimit
|
|
|
|
, size_t graphInd);
|
2013-08-06 18:04:57 +04:00
|
|
|
|
2011-02-24 16:14:42 +03:00
|
|
|
public:
|
2015-03-30 03:20:17 +03:00
|
|
|
TranslationOptionCollectionConfusionNet(ttasksptr const& ttask, const ConfusionNet &source, size_t maxNoTransOptPerCoverage, float translationOptionThreshold);
|
2008-06-11 14:52:57 +04:00
|
|
|
|
2011-02-24 16:14:42 +03:00
|
|
|
void ProcessUnknownWord(size_t sourcePos);
|
2013-07-11 19:19:38 +04:00
|
|
|
void CreateTranslationOptions();
|
2013-07-09 17:19:35 +04:00
|
|
|
|
2015-02-19 15:27:23 +03:00
|
|
|
bool
|
2015-02-06 02:30:56 +03:00
|
|
|
CreateTranslationOptionsForRange
|
|
|
|
(const DecodeGraph &decodeStepList, size_t spos, size_t epos,
|
|
|
|
bool adhereTableLimit, size_t graphInd);
|
2015-02-19 15:27:23 +03:00
|
|
|
|
2013-07-09 17:19:35 +04:00
|
|
|
protected:
|
|
|
|
|
2008-06-11 14:52:57 +04:00
|
|
|
};
|
2008-10-09 03:51:26 +04:00
|
|
|
|
|
|
|
}
|
2010-02-24 14:15:44 +03:00
|
|
|
#endif
|
2013-06-21 04:17:17 +04:00
|
|
|
|