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

github.com/moses-smt/giza-pp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredpony <redpony@ca354974-eb3a-0410-8f5c-d3948404989b>2009-03-20 14:53:44 +0300
committerredpony <redpony@ca354974-eb3a-0410-8f5c-d3948404989b>2009-03-20 14:53:44 +0300
commitf230281b249108452b1fff9e7bd9c43195a45e8d (patch)
treead56a2b7266749fd60e0a6a71a9e2be74b34eb22
parent06491c9dd034b07763f511f3acff9bf975e5f14f (diff)
fixes for g++ 4.3.1 (mostly standard header compliance)
-rw-r--r--GIZA++-v2/ATables.h2
-rw-r--r--GIZA++-v2/Dictionary.cpp2
-rw-r--r--GIZA++-v2/NTables.h2
-rw-r--r--GIZA++-v2/Parameter.cpp4
-rw-r--r--GIZA++-v2/Parameter.h1
-rw-r--r--GIZA++-v2/Perplexity.h4
-rw-r--r--GIZA++-v2/Pointer.h4
-rw-r--r--GIZA++-v2/TTables.h4
-rw-r--r--GIZA++-v2/Vector.h2
-rw-r--r--GIZA++-v2/alignment.h2
-rw-r--r--GIZA++-v2/hmm.h8
-rw-r--r--GIZA++-v2/model1.h10
-rw-r--r--GIZA++-v2/model2.h8
-rw-r--r--GIZA++-v2/model3.h8
-rw-r--r--GIZA++-v2/parse.cpp2
-rw-r--r--GIZA++-v2/plain2snt.cpp1
-rw-r--r--GIZA++-v2/snt2cooc.cpp1
-rw-r--r--GIZA++-v2/snt2plain.cpp1
-rw-r--r--GIZA++-v2/transpair_model1.h2
-rw-r--r--GIZA++-v2/transpair_model2.h2
-rw-r--r--GIZA++-v2/transpair_model3.h2
-rw-r--r--GIZA++-v2/transpair_modelhmm.h2
22 files changed, 40 insertions, 34 deletions
diff --git a/GIZA++-v2/ATables.h b/GIZA++-v2/ATables.h
index b4ebfcb..a1183ab 100644
--- a/GIZA++-v2/ATables.h
+++ b/GIZA++-v2/ATables.h
@@ -47,7 +47,7 @@ using __gnu_cxx::hash_map;
#else
#include <hash_map>
#endif
-#include <fstream.h>
+#include <fstream>
#include "Array4.h"
#include "myassert.h"
#include "Globals.h"
diff --git a/GIZA++-v2/Dictionary.cpp b/GIZA++-v2/Dictionary.cpp
index ee77ff5..6773fec 100644
--- a/GIZA++-v2/Dictionary.cpp
+++ b/GIZA++-v2/Dictionary.cpp
@@ -30,6 +30,8 @@ USA.
#include "Dictionary.h"
+#include <cstring>
+
Dictionary::Dictionary(const char *filename){
if(!strcmp(filename, "")){
dead = true;
diff --git a/GIZA++-v2/NTables.h b/GIZA++-v2/NTables.h
index 9ca086e..4bb0565 100644
--- a/GIZA++-v2/NTables.h
+++ b/GIZA++-v2/NTables.h
@@ -23,7 +23,7 @@ USA.
#define _ntables_h 1
#include "Array2.h"
#include "Vector.h"
-#include <assert.h>
+#include <cassert>
#include "defs.h"
#include "vocab.h"
#include "myassert.h"
diff --git a/GIZA++-v2/Parameter.cpp b/GIZA++-v2/Parameter.cpp
index 7af6916..94a97e9 100644
--- a/GIZA++-v2/Parameter.cpp
+++ b/GIZA++-v2/Parameter.cpp
@@ -21,8 +21,8 @@ USA.
*/
#include "Parameter.h"
-#include "fstream.h"
-#include "unistd.h"
+#include <fstream>
+#include <unistd.h>
#include <strstream>
diff --git a/GIZA++-v2/Parameter.h b/GIZA++-v2/Parameter.h
index 5125f92..9a6239d 100644
--- a/GIZA++-v2/Parameter.h
+++ b/GIZA++-v2/Parameter.h
@@ -29,6 +29,7 @@ USA.
#include <string>
#include "Globals.h"
#include <fstream>
+#include <cstring>
inline unsigned int mConvert(const string&s,unsigned int &i)
{
diff --git a/GIZA++-v2/Perplexity.h b/GIZA++-v2/Perplexity.h
index b06b3dc..5010280 100644
--- a/GIZA++-v2/Perplexity.h
+++ b/GIZA++-v2/Perplexity.h
@@ -34,8 +34,8 @@ USA.
#ifndef _PERPLEXITY_H
#define _PERPLEXITY_H
-#include <math.h>
-#include <fstream.h>
+#include <cmath>
+#include <fstream>
#include "Vector.h"
#include "defs.h"
#include "Array2.h"
diff --git a/GIZA++-v2/Pointer.h b/GIZA++-v2/Pointer.h
index 7d786e5..4892656 100644
--- a/GIZA++-v2/Pointer.h
+++ b/GIZA++-v2/Pointer.h
@@ -23,8 +23,8 @@ USA.
#ifndef HEADER_Pointer_DEFINED
#define HEADER_Pointer_DEFINED
-#include <assert.h>
-#include <stream.h>
+#include <cassert>
+#include <ostream>
template<class T>
class SmartPointer
diff --git a/GIZA++-v2/TTables.h b/GIZA++-v2/TTables.h
index 4b609ff..87d0196 100644
--- a/GIZA++-v2/TTables.h
+++ b/GIZA++-v2/TTables.h
@@ -36,7 +36,7 @@ USA.
#include "defs.h"
#include "vocab.h"
-#include <assert.h>
+#include <cassert>
#include <iostream>
#include <algorithm>
@@ -53,7 +53,7 @@ using __gnu_cxx::hash_map;
#include <hash_map>
#endif
-#include <fstream.h>
+#include <fstream>
#include "Globals.h"
diff --git a/GIZA++-v2/Vector.h b/GIZA++-v2/Vector.h
index d0d5d1f..cd682c1 100644
--- a/GIZA++-v2/Vector.h
+++ b/GIZA++-v2/Vector.h
@@ -31,7 +31,7 @@ Franz Josef Och (30/07/99)
#include <string>
#include <utility>
#include <functional>
-#include <assert.h>
+#include <cassert>
#ifdef NDEBUG
diff --git a/GIZA++-v2/alignment.h b/GIZA++-v2/alignment.h
index 17774c6..03cf028 100644
--- a/GIZA++-v2/alignment.h
+++ b/GIZA++-v2/alignment.h
@@ -26,7 +26,7 @@ Franz Josef Och (30/07/99)
#ifndef alignment_h_fjo_defined
#define alignment_h_fjo_defined
#include "Vector.h"
-#include <assert.h>
+#include <cassert>
#include "defs.h"
#include "myassert.h"
diff --git a/GIZA++-v2/hmm.h b/GIZA++-v2/hmm.h
index d4f3301..ee6009b 100644
--- a/GIZA++-v2/hmm.h
+++ b/GIZA++-v2/hmm.h
@@ -22,7 +22,7 @@ USA.
#ifndef _hmm_h
#define _hmm_h 1
-#include <assert.h>
+#include <cassert>
#include <iostream>
#include <algorithm>
@@ -38,9 +38,9 @@ using __gnu_cxx::hash_map;
#else
#include <hash_map>
#endif
-#include <fstream.h>
-#include <math.h>
-#include <time.h>
+#include <fstream>
+#include <cmath>
+#include <ctime>
#include "TTables.h"
#include "ATables.h"
diff --git a/GIZA++-v2/model1.h b/GIZA++-v2/model1.h
index a49b2c6..7157f5e 100644
--- a/GIZA++-v2/model1.h
+++ b/GIZA++-v2/model1.h
@@ -22,7 +22,7 @@ USA.
#ifndef _model1_h
#define _model1_h 1
-#include <assert.h>
+#include <cassert>
#include <iostream>
#include <strstream>
@@ -38,10 +38,10 @@ using __gnu_cxx::hash_map;
#else
#include <hash_map>
#endif
-#include <time.h>
-#include <fstream.h>
-#include <math.h>
-#include <stdio.h>
+#include <ctime>
+#include <fstream>
+#include <cmath>
+#include <cstdio>
#include "Vector.h"
#include "vocab.h"
diff --git a/GIZA++-v2/model2.h b/GIZA++-v2/model2.h
index 8d31b99..46b7e3e 100644
--- a/GIZA++-v2/model2.h
+++ b/GIZA++-v2/model2.h
@@ -22,7 +22,7 @@ USA.
#ifndef _model2_h
#define _model2_h 1
-#include <assert.h>
+#include <cassert>
#include <iostream>
#include <algorithm>
@@ -39,9 +39,9 @@ using __gnu_cxx::hash_map;
#include <hash_map>
#endif
-#include <fstream.h>
-#include <math.h>
-#include <time.h>
+#include <fstream>
+#include <cmath>
+#include <ctime>
#include "TTables.h"
#include "ATables.h"
diff --git a/GIZA++-v2/model3.h b/GIZA++-v2/model3.h
index a7db406..964e41b 100644
--- a/GIZA++-v2/model3.h
+++ b/GIZA++-v2/model3.h
@@ -21,7 +21,7 @@ USA.
*/
#ifndef _model3_h
#define _model3_h 1
-#include <assert.h>
+#include <cassert>
#include <iostream>
#include <algorithm>
#include <functional>
@@ -37,9 +37,9 @@ using __gnu_cxx::hash_map;
#endif
-#include <time.h>
+#include <ctime>
#include <fstream>
-#include <math.h>
+#include <cmath>
#include "MoveSwapMatrix.h"
#include "TTables.h"
#include "ATables.h"
@@ -126,7 +126,7 @@ private:
LogProb viterbi_model2(const transpair_modelhmm&ef, alignment&output, int pair_no,int i_peg = -1 , int j_peg = -1 )const;
private:
- void estimate_t_a_d(sentenceHandler& sHandler1, Perplexity& perp, Perplexity& perp,bool simple, bool dump_files,bool updateT);
+ void estimate_t_a_d(sentenceHandler& sHandler1, Perplexity& perp1, Perplexity& perp2,bool simple, bool dump_files,bool updateT);
void viterbi_loop(Perplexity&, Perplexity&, sentenceHandler&, bool, const char*,bool,string model);
template<class MODEL_TYPE, class A,class B>
diff --git a/GIZA++-v2/parse.cpp b/GIZA++-v2/parse.cpp
index c67a9ff..c82f6b7 100644
--- a/GIZA++-v2/parse.cpp
+++ b/GIZA++-v2/parse.cpp
@@ -24,7 +24,7 @@ USA.
#include <strstream>
#include <string>
-#include <fstream.h>
+#include <fstream>
#include "defs.h"
#include "utility.h"
#include "Globals.h"
diff --git a/GIZA++-v2/plain2snt.cpp b/GIZA++-v2/plain2snt.cpp
index 035d5fc..b43d2cb 100644
--- a/GIZA++-v2/plain2snt.cpp
+++ b/GIZA++-v2/plain2snt.cpp
@@ -4,6 +4,7 @@
#include <fstream>
#include <map>
#include <vector>
+#include <cstdlib>
using namespace std;
diff --git a/GIZA++-v2/snt2cooc.cpp b/GIZA++-v2/snt2cooc.cpp
index 0a656d2..f8b9c7e 100644
--- a/GIZA++-v2/snt2cooc.cpp
+++ b/GIZA++-v2/snt2cooc.cpp
@@ -5,6 +5,7 @@
#include <map>
#include <vector>
#include <set>
+#include <cstdlib>
using namespace std;
diff --git a/GIZA++-v2/snt2plain.cpp b/GIZA++-v2/snt2plain.cpp
index 7b41c46..e83272f 100644
--- a/GIZA++-v2/snt2plain.cpp
+++ b/GIZA++-v2/snt2plain.cpp
@@ -4,6 +4,7 @@
#include <fstream>
#include <map>
#include <vector>
+#include <cstdlib>
using namespace std;
diff --git a/GIZA++-v2/transpair_model1.h b/GIZA++-v2/transpair_model1.h
index 00d7875..dd1425d 100644
--- a/GIZA++-v2/transpair_model1.h
+++ b/GIZA++-v2/transpair_model1.h
@@ -31,7 +31,7 @@ USA.
#include "ATables.h"
#include "TTables.h"
#include "alignment.h"
-#include <math.h>
+#include <cmath>
#include <algorithm>
#include "Array2.h"
#include "mystl.h"
diff --git a/GIZA++-v2/transpair_model2.h b/GIZA++-v2/transpair_model2.h
index f3d53e3..751ce52 100644
--- a/GIZA++-v2/transpair_model2.h
+++ b/GIZA++-v2/transpair_model2.h
@@ -29,7 +29,7 @@ USA.
#include "ATables.h"
#include "TTables.h"
#include "alignment.h"
-#include <math.h>
+#include <cmath>
#include "transpair_model1.h"
diff --git a/GIZA++-v2/transpair_model3.h b/GIZA++-v2/transpair_model3.h
index 5fa43db..9c07fd9 100644
--- a/GIZA++-v2/transpair_model3.h
+++ b/GIZA++-v2/transpair_model3.h
@@ -34,7 +34,7 @@ Franz Josef Och (30/07/99)
#include "ATables.h"
#include "TTables.h"
#include "alignment.h"
-#include <math.h>
+#include <cmath>
#include "transpair_model2.h"
extern double factorial(int n);
diff --git a/GIZA++-v2/transpair_modelhmm.h b/GIZA++-v2/transpair_modelhmm.h
index 2b38913..d836ad4 100644
--- a/GIZA++-v2/transpair_modelhmm.h
+++ b/GIZA++-v2/transpair_modelhmm.h
@@ -29,7 +29,7 @@ USA.
#include "ATables.h"
#include "TTables.h"
#include "alignment.h"
-#include <math.h>
+#include <cmath>
#include "transpair_model2.h"
#include "ForwardBackward.h"
#include "hmm.h"