2013-10-02 21:42:56 +04:00
|
|
|
// $Id$
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "TranslationOptionCollection.h"
|
|
|
|
#include "InputPath.h"
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
2013-10-03 15:03:09 +04:00
|
|
|
class WordLattice;
|
2013-10-02 21:42:56 +04:00
|
|
|
|
2013-10-03 15:03:09 +04:00
|
|
|
/** Holds all translation options, for all spans, of a lattice input. NOT confusion networks
|
|
|
|
* No legacy phrase-tables, CANNOT be used with Zen's binary phrase-table.
|
2013-10-02 21:42:56 +04:00
|
|
|
*/
|
|
|
|
class TranslationOptionCollectionLattice : public TranslationOptionCollection
|
|
|
|
{
|
|
|
|
protected:
|
2013-10-03 21:58:45 +04:00
|
|
|
void ProcessUnknownWord();
|
|
|
|
void ProcessUnknownWord(size_t sourcePos);
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
public:
|
2013-10-03 15:03:09 +04:00
|
|
|
TranslationOptionCollectionLattice(const WordLattice &source, size_t maxNoTransOptPerCoverage, float translationOptionThreshold);
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
void CreateTranslationOptions();
|
2013-10-03 21:58:45 +04:00
|
|
|
|
2013-10-02 21:42:56 +04:00
|
|
|
void CreateTranslationOptionsForRange(const DecodeGraph &decodeStepList
|
2013-10-03 21:58:45 +04:00
|
|
|
, size_t startPosition
|
|
|
|
, size_t endPosition
|
|
|
|
, bool adhereTableLimit
|
|
|
|
, size_t graphInd);
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|