Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mgiza.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Vermeulen <jtv@xs4all.nl>2016-03-22 22:29:43 +0300
committerJeroen Vermeulen <jtv@xs4all.nl>2016-03-22 22:29:43 +0300
commit6baff1961eb4d6dcea86841fd5e7924eb05300da (patch)
tree7996098517d2ca787748e5b67d260190d8754e7f
parentad352a043ccdd465ea2d9dc68e00536d6ec5ba1f (diff)
Fix some warnings.
-rw-r--r--mgizapp/src/hmm.cpp2
-rw-r--r--mgizapp/src/model2.cpp5
-rw-r--r--mgizapp/src/model3_viterbi.cpp2
3 files changed, 3 insertions, 6 deletions
diff --git a/mgizapp/src/hmm.cpp b/mgizapp/src/hmm.cpp
index 66a6bda..3dbb753 100644
--- a/mgizapp/src/hmm.cpp
+++ b/mgizapp/src/hmm.cpp
@@ -74,7 +74,7 @@ void smooth_standard(T*a,T*b,double p)
hmm::hmm(model2&m2,WordClasses &e, WordClasses& f)
- : ewordclasses(e), fwordclasses(f),model2(m2),counts(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses),
+ : model2(m2), ewordclasses(e), fwordclasses(f), counts(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses),
probs(GLOBALProbabilityForEmpty,ewordclasses,fwordclasses)
{
}
diff --git a/mgizapp/src/model2.cpp b/mgizapp/src/model2.cpp
index 82420f2..05ab3bd 100644
--- a/mgizapp/src/model2.cpp
+++ b/mgizapp/src/model2.cpp
@@ -63,7 +63,6 @@ int model2::em_with_tricks(int noIterations,bool dumpCount,
string modelName="Model2",shortModelName="2";
time_t it_st, st, it_fn, fn;
string tfile, afile, alignfile, test_alignfile;
- int pair_no = 0;
bool dump_files = false ;
ofstream of2 ;
st = time(NULL) ;
@@ -71,7 +70,6 @@ int model2::em_with_tricks(int noIterations,bool dumpCount,
cout << "\n==========================================================\n";
cout << modelName << " Training Started at: " << my_ctime(&st) << " iter: " << noIterations << "\n";
for(int it=1; it <= noIterations ; it++) {
- pair_no = 0;
it_st = time(NULL) ;
cout << endl << "-----------\n" << modelName << ": Iteration " << it << '\n';
dump_files = (Model2_Dump_Freq != 0) && ((it % Model2_Dump_Freq) == 0) && !NODUMPS;
@@ -208,11 +206,12 @@ void model2::em_loop(Perplexity& perp, sentenceHandler& sHandler1,
else e = PROB_SMOOTH ;
e *= aTable.getValue(i,j, l, m);
COUNT temp = COUNT(e) * val ;
- if( NoEmptyWord==0 || i!=0 )
+ if( NoEmptyWord==0 || i!=0 ) {
if (sPtrCache[i] != 0)
(*(sPtrCache[i])).count += temp ;
else
tTable.incCount(es[i], fs[j], temp);
+ }
aCountTable.addValue(i,j, l, m,temp) ;
} /* end of for i */
} // end of if (denom > 0)
diff --git a/mgizapp/src/model3_viterbi.cpp b/mgizapp/src/model3_viterbi.cpp
index 1ec154d..9073a16 100644
--- a/mgizapp/src/model3_viterbi.cpp
+++ b/mgizapp/src/model3_viterbi.cpp
@@ -366,7 +366,6 @@ void model3::findAlignmentsNeighborhood(Vector<WordIndex>& es,
WordIndex i, j, l, m, old_i, j1;
Vector<WordIndex> A(fs.size(),0);
Vector<WordIndex> Fert(es.size(),0);
- time_t it_st;
best_score = 0;
l = es.size() - 1;
@@ -402,7 +401,6 @@ void model3::findAlignmentsNeighborhood(Vector<WordIndex>& es,
cerr << "Condition violated : 2 * Fert[0] <= m " << 2*Fert[0] <<"?"
<< m << "\n";
} // end of added code for debugging // Yaser
- it_st = time(NULL) ;
// Now find add all neighbors of the best alignmet to the collection
for (j = 1; j <= m; j++) {