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:
|
2014-01-15 19:42:02 +04:00
|
|
|
/* forcibly create translation option for a 1 word.
|
|
|
|
* call the base class' ProcessOneUnknownWord() for each possible word in the confusion network
|
|
|
|
* at a particular source position
|
|
|
|
*/
|
2013-10-04 16:08:14 +04:00
|
|
|
void ProcessUnknownWord(size_t sourcePos); // do not implement
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
public:
|
2015-12-11 13:12:54 +03:00
|
|
|
TranslationOptionCollectionLattice(ttasksptr const& ttask, 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
|
|
|
|
2015-02-19 15:27:23 +03:00
|
|
|
bool
|
2015-02-06 01:48:46 +03:00
|
|
|
CreateTranslationOptionsForRange
|
|
|
|
(const DecodeGraph &decodeStepList, size_t startPosition, size_t endPosition,
|
|
|
|
bool adhereTableLimit, size_t graphInd); // do not implement
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
protected:
|
2015-12-07 19:07:11 +03:00
|
|
|
void Extend(const InputPath &prevPath, const WordLattice &input,
|
2015-12-09 03:00:35 +03:00
|
|
|
size_t const maxPhraseLength);
|
2013-10-02 21:42:56 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|