mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 12:52:29 +03:00
rename ProcessSentence() to Decode()
This commit is contained in:
parent
d0807c45f2
commit
9739b7a8a7
@ -84,7 +84,7 @@ void ChartCell::PruneToSize()
|
||||
* \param transOptList list of applicable rules to create hypotheses for the cell
|
||||
* \param allChartCells entire chart - needed to look up underlying hypotheses
|
||||
*/
|
||||
void ChartCell::ProcessSentence(const ChartTranslationOptionList &transOptList
|
||||
void ChartCell::Decode(const ChartTranslationOptionList &transOptList
|
||||
, const ChartCellCollection &allChartCells)
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
ChartCell(size_t startPos, size_t endPos, ChartManager &manager);
|
||||
~ChartCell();
|
||||
|
||||
void ProcessSentence(const ChartTranslationOptionList &transOptList
|
||||
void Decode(const ChartTranslationOptionList &transOptList
|
||||
,const ChartCellCollection &allChartCells);
|
||||
|
||||
//! Get all hypotheses in the cell that have the specified constituent label
|
||||
|
@ -93,7 +93,7 @@ void ChartManager::Decode()
|
||||
|
||||
// decode
|
||||
ChartCell &cell = m_hypoStackColl.Get(range);
|
||||
cell.ProcessSentence(m_translationOptionList, m_hypoStackColl);
|
||||
cell.Decode(m_translationOptionList, m_hypoStackColl);
|
||||
|
||||
m_translationOptionList.Clear();
|
||||
cell.PruneToSize();
|
||||
|
@ -115,7 +115,7 @@ void Manager::Decode()
|
||||
// search for best translation with the specified algorithm
|
||||
Timer searchTime;
|
||||
searchTime.start();
|
||||
m_search->ProcessSentence();
|
||||
m_search->Decode();
|
||||
VERBOSE(1, "Line " << m_source.GetTranslationId() << ": Search took " << searchTime << " seconds" << endl);
|
||||
IFVERBOSE(2) {
|
||||
GetSentenceStats().StopTimeTotal();
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
virtual const Hypothesis *GetBestHypothesis() const = 0;
|
||||
|
||||
//! Decode the sentence according to the specified search algorithm.
|
||||
virtual void ProcessSentence() = 0;
|
||||
virtual void Decode() = 0;
|
||||
|
||||
explicit Search(Manager& manager);
|
||||
virtual ~Search() {}
|
||||
|
@ -64,7 +64,7 @@ SearchCubePruning::~SearchCubePruning()
|
||||
* Main decoder loop that translates a sentence by expanding
|
||||
* hypotheses stack by stack, until the end of the sentence.
|
||||
*/
|
||||
void SearchCubePruning::ProcessSentence()
|
||||
void SearchCubePruning::Decode()
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
SearchCubePruning(Manager& manager, const InputType &source, const TranslationOptionCollection &transOptColl);
|
||||
~SearchCubePruning();
|
||||
|
||||
void ProcessSentence();
|
||||
void Decode();
|
||||
|
||||
void OutputHypoStackSize();
|
||||
void OutputHypoStack(int stack);
|
||||
|
@ -47,7 +47,7 @@ SearchNormal::~SearchNormal()
|
||||
* Main decoder loop that translates a sentence by expanding
|
||||
* hypotheses stack by stack, until the end of the sentence.
|
||||
*/
|
||||
void SearchNormal::ProcessSentence()
|
||||
void SearchNormal::Decode()
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
SentenceStats &stats = m_manager.GetSentenceStats();
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
SearchNormal(Manager& manager, const InputType &source, const TranslationOptionCollection &transOptColl);
|
||||
~SearchNormal();
|
||||
|
||||
void ProcessSentence();
|
||||
void Decode();
|
||||
|
||||
void OutputHypoStackSize();
|
||||
void OutputHypoStack();
|
||||
|
@ -40,7 +40,7 @@ SearchNormalBatch::~SearchNormalBatch()
|
||||
* Main decoder loop that translates a sentence by expanding
|
||||
* hypotheses stack by stack, until the end of the sentence.
|
||||
*/
|
||||
void SearchNormalBatch::ProcessSentence()
|
||||
void SearchNormalBatch::Decode()
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
SentenceStats &stats = m_manager.GetSentenceStats();
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
SearchNormalBatch(Manager& manager, const InputType &source, const TranslationOptionCollection &transOptColl);
|
||||
~SearchNormalBatch();
|
||||
|
||||
void ProcessSentence();
|
||||
void Decode();
|
||||
|
||||
};
|
||||
|
||||
|
@ -150,7 +150,7 @@ void TranslationTask::RunPb()
|
||||
}
|
||||
|
||||
out << endl;
|
||||
}
|
||||
} // if (!staticData.UseMBR())
|
||||
|
||||
// MBR decoding (n-best MBR, lattice MBR, consensus)
|
||||
else {
|
||||
@ -218,7 +218,7 @@ void TranslationTask::RunPb()
|
||||
|
||||
decisionRuleTime.stop();
|
||||
VERBOSE(1, "Line " << m_source->GetTranslationId() << ": Decision rule took " << decisionRuleTime << " seconds total" << endl);
|
||||
}
|
||||
} // if (m_ioWrapper.GetSingleBestOutputCollector())
|
||||
|
||||
additionalReportingTime.start();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user