diff options
author | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2007-10-22 00:56:23 +0400 |
---|---|---|
committer | hieuhoang1972 <hieuhoang1972@1f5c12ca-751b-0410-a591-d2e778427230> | 2007-10-22 00:56:23 +0400 |
commit | 80709221a46cf40c7dd7c9daa5f68660afa4d61e (patch) | |
tree | e53e7c55cc730694e3876496ad05cd580528a008 | |
parent | ab1d8e0e9490d52e7dba34d0925c61fa60099bc3 (diff) |
visual studio project & minor code cleaneva_2d_pruning@1488
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk/moses@1475 1f5c12ca-751b-0410-a591-d2e778427230
-rwxr-xr-x | moses.vcproj | 4 | ||||
-rwxr-xr-x | src/Manager.cpp | 14 | ||||
-rwxr-xr-x | src/Manager.h | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/moses.vcproj b/moses.vcproj index 33438e35b..54058d1a4 100755 --- a/moses.vcproj +++ b/moses.vcproj @@ -579,10 +579,6 @@ >
</File>
<File
- RelativePath=".\src\PhraseReference.cpp"
- >
- </File>
- <File
RelativePath=".\src\PrefixTreeMap.cpp"
>
</File>
diff --git a/src/Manager.cpp b/src/Manager.cpp index 4f72a55b3..479292474 100755 --- a/src/Manager.cpp +++ b/src/Manager.cpp @@ -47,7 +47,7 @@ static bool debug2 = false; Manager::Manager(InputType const& source) :m_source(source) ,m_hypoStackColl(source.GetSize() + 1) -,m_possibleTranslations(source.CreateTranslationOptionCollection()) +,m_transOptColl(source.CreateTranslationOptionCollection()) ,m_initialTargetPhrase(Output) ,m_start(clock()) { @@ -66,7 +66,7 @@ Manager::Manager(InputType const& source) Manager::~Manager() { - delete m_possibleTranslations; + delete m_transOptColl; StaticData::Instance().CleanUpAfterSentenceProcessing(); clock_t end = clock(); @@ -92,7 +92,7 @@ void Manager::ProcessSentence() // 1. generation of source sentence is not done 1st // 2. initial hypothesis factors are given in the sentence //CreateTranslationOptions(m_source, phraseDictionary, lmListInitial); - m_possibleTranslations->CreateTranslationOptions(decodeStepVL); + m_transOptColl->CreateTranslationOptions(decodeStepVL); // initial seed hypothesis: nothing translated, no words produced { @@ -155,7 +155,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis) if (!hypoBitmap.Overlap(WordsRange(startPos, endPos))) { ExpandAllHypotheses(hypothesis - , m_possibleTranslations->GetTranslationOptionList(WordsRange(startPos, endPos))); + , m_transOptColl->GetTranslationOptionList(WordsRange(startPos, endPos))); } } } @@ -234,7 +234,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis) if (debug2) { std::cerr << "Ext!\n"; StaticData::Instance().SetVerboseLevel(4); } #endif ExpandAllHypotheses(hypothesis - ,m_possibleTranslations->GetTranslationOptionList(extRange)); + ,m_transOptColl->GetTranslationOptionList(extRange)); #ifdef DEBUGLATTICE StaticData::Instance().SetVerboseLevel(vl); #endif @@ -255,7 +255,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis) if (required_distortion <= maxDistortion) { ExpandAllHypotheses(hypothesis - ,m_possibleTranslations->GetTranslationOptionList(extRange)); + ,m_transOptColl->GetTranslationOptionList(extRange)); } #ifdef DEBUGLATTICE else @@ -295,7 +295,7 @@ void Manager::ExpandHypothesis(const Hypothesis &hypothesis, const TranslationOp if (debug2) { std::cerr << "::EXT: " << transOpt << "\n"; } #endif Hypothesis *newHypo = hypothesis.CreateNext(transOpt); - newHypo->CalcScore(m_possibleTranslations->GetFutureScore()); + newHypo->CalcScore(m_transOptColl->GetFutureScore()); // logging for the curious IFVERBOSE(3) { diff --git a/src/Manager.h b/src/Manager.h index 01e37016c..6c1383e0d 100755 --- a/src/Manager.h +++ b/src/Manager.h @@ -77,7 +77,7 @@ protected: std::vector < HypothesisStack > m_hypoStackColl; /**< stacks to store hypothesis (partial translations) */ // no of elements = no of words in source + 1 - TranslationOptionCollection *m_possibleTranslations; /**< pre-computed list of translation options for the phrases in this sentence */ + TranslationOptionCollection *m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */ TargetPhrase m_initialTargetPhrase; /**< used to seed 1st hypo */ clock_t m_start; /**< starting time, used for logging */ |