mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
54 lines
1.5 KiB
C
54 lines
1.5 KiB
C
|
// $Id$
|
||
|
#pragma once
|
||
|
|
||
|
#include "TranslationOptionCollection.h"
|
||
|
#include "InputPath.h"
|
||
|
|
||
|
namespace Moses
|
||
|
{
|
||
|
|
||
|
class ConfusionNet;
|
||
|
|
||
|
/** Holds all translation options, for all spans, of a particular confusion network input
|
||
|
* Inherited from TranslationOptionCollection.
|
||
|
*/
|
||
|
class TranslationOptionCollectionLattice : public TranslationOptionCollection
|
||
|
{
|
||
|
public:
|
||
|
typedef std::vector< std::vector<InputPathList> > InputPathMatrix;
|
||
|
|
||
|
protected:
|
||
|
|
||
|
InputPathMatrix m_inputPathMatrix; /*< contains translation options */
|
||
|
|
||
|
InputPathList &GetInputPathList(size_t startPos, size_t endPos);
|
||
|
void CreateTranslationOptionsForRangeNew(const DecodeGraph &decodeStepList
|
||
|
, size_t startPosition
|
||
|
, size_t endPosition
|
||
|
, bool adhereTableLimit
|
||
|
, size_t graphInd);
|
||
|
|
||
|
void CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeStepList
|
||
|
, size_t startPosition
|
||
|
, size_t endPosition
|
||
|
, bool adhereTableLimit
|
||
|
, size_t graphInd);
|
||
|
|
||
|
public:
|
||
|
TranslationOptionCollectionLattice(const ConfusionNet &source, size_t maxNoTransOptPerCoverage, float translationOptionThreshold);
|
||
|
|
||
|
void ProcessUnknownWord(size_t sourcePos);
|
||
|
void CreateTranslationOptions();
|
||
|
void CreateTranslationOptionsForRange(const DecodeGraph &decodeStepList
|
||
|
, size_t startPosition
|
||
|
, size_t endPosition
|
||
|
, bool adhereTableLimit
|
||
|
, size_t graphInd);
|
||
|
|
||
|
protected:
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|