rename ProcessSentence() to Decode()

This commit is contained in:
Hieu Hoang 2014-12-26 13:11:52 +05:30
parent d0807c45f2
commit 9739b7a8a7
12 changed files with 13 additions and 13 deletions

View File

@ -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();

View File

@ -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

View File

@ -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();

View File

@ -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();

View File

@ -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() {}

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -36,7 +36,7 @@ public:
SearchNormal(Manager& manager, const InputType &source, const TranslationOptionCollection &transOptColl);
~SearchNormal();
void ProcessSentence();
void Decode();
void OutputHypoStackSize();
void OutputHypoStack();

View File

@ -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();

View File

@ -35,7 +35,7 @@ public:
SearchNormalBatch(Manager& manager, const InputType &source, const TranslationOptionCollection &transOptColl);
~SearchNormalBatch();
void ProcessSentence();
void Decode();
};

View File

@ -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();