Skip to content

Commit 8070922

Browse files
author
hieuhoang1972
committed
visual studio project & minor code clean
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk/moses@1475 1f5c12ca-751b-0410-a591-d2e778427230
1 parent ab1d8e0 commit 8070922

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

moses.vcproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,6 @@
578578
RelativePath=".\src\PhraseDictionaryTreeAdaptor.cpp"
579579
>
580580
</File>
581-
<File
582-
RelativePath=".\src\PhraseReference.cpp"
583-
>
584-
</File>
585581
<File
586582
RelativePath=".\src\PrefixTreeMap.cpp"
587583
>

src/Manager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static bool debug2 = false;
4747
Manager::Manager(InputType const& source)
4848
:m_source(source)
4949
,m_hypoStackColl(source.GetSize() + 1)
50-
,m_possibleTranslations(source.CreateTranslationOptionCollection())
50+
,m_transOptColl(source.CreateTranslationOptionCollection())
5151
,m_initialTargetPhrase(Output)
5252
,m_start(clock())
5353
{
@@ -66,7 +66,7 @@ Manager::Manager(InputType const& source)
6666

6767
Manager::~Manager()
6868
{
69-
delete m_possibleTranslations;
69+
delete m_transOptColl;
7070
StaticData::Instance().CleanUpAfterSentenceProcessing();
7171

7272
clock_t end = clock();
@@ -92,7 +92,7 @@ void Manager::ProcessSentence()
9292
// 1. generation of source sentence is not done 1st
9393
// 2. initial hypothesis factors are given in the sentence
9494
//CreateTranslationOptions(m_source, phraseDictionary, lmListInitial);
95-
m_possibleTranslations->CreateTranslationOptions(decodeStepVL);
95+
m_transOptColl->CreateTranslationOptions(decodeStepVL);
9696

9797
// initial seed hypothesis: nothing translated, no words produced
9898
{
@@ -155,7 +155,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis)
155155
if (!hypoBitmap.Overlap(WordsRange(startPos, endPos)))
156156
{
157157
ExpandAllHypotheses(hypothesis
158-
, m_possibleTranslations->GetTranslationOptionList(WordsRange(startPos, endPos)));
158+
, m_transOptColl->GetTranslationOptionList(WordsRange(startPos, endPos)));
159159
}
160160
}
161161
}
@@ -234,7 +234,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis)
234234
if (debug2) { std::cerr << "Ext!\n"; StaticData::Instance().SetVerboseLevel(4); }
235235
#endif
236236
ExpandAllHypotheses(hypothesis
237-
,m_possibleTranslations->GetTranslationOptionList(extRange));
237+
,m_transOptColl->GetTranslationOptionList(extRange));
238238
#ifdef DEBUGLATTICE
239239
StaticData::Instance().SetVerboseLevel(vl);
240240
#endif
@@ -255,7 +255,7 @@ void Manager::ProcessOneHypothesis(const Hypothesis &hypothesis)
255255

256256
if (required_distortion <= maxDistortion) {
257257
ExpandAllHypotheses(hypothesis
258-
,m_possibleTranslations->GetTranslationOptionList(extRange));
258+
,m_transOptColl->GetTranslationOptionList(extRange));
259259
}
260260
#ifdef DEBUGLATTICE
261261
else
@@ -295,7 +295,7 @@ void Manager::ExpandHypothesis(const Hypothesis &hypothesis, const TranslationOp
295295
if (debug2) { std::cerr << "::EXT: " << transOpt << "\n"; }
296296
#endif
297297
Hypothesis *newHypo = hypothesis.CreateNext(transOpt);
298-
newHypo->CalcScore(m_possibleTranslations->GetFutureScore());
298+
newHypo->CalcScore(m_transOptColl->GetFutureScore());
299299

300300
// logging for the curious
301301
IFVERBOSE(3) {

src/Manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Manager
7777

7878
std::vector < HypothesisStack > m_hypoStackColl; /**< stacks to store hypothesis (partial translations) */
7979
// no of elements = no of words in source + 1
80-
TranslationOptionCollection *m_possibleTranslations; /**< pre-computed list of translation options for the phrases in this sentence */
80+
TranslationOptionCollection *m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */
8181
TargetPhrase m_initialTargetPhrase; /**< used to seed 1st hypo */
8282
clock_t m_start; /**< starting time, used for logging */
8383

0 commit comments

Comments
 (0)