mosesdecoder/moses/TranslationOptionCollectionConfusionNet.h

55 lines
1.5 KiB
C
Raw Normal View History

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