diff options
author | Wu, Ke <wuke@cs.umd.edu> | 2014-10-07 17:41:19 -0400 |
---|---|---|
committer | Wu, Ke <wuke@cs.umd.edu> | 2014-10-07 17:41:19 -0400 |
commit | 577e6e7f9755919f4929235d2320435522e65d76 (patch) | |
tree | 39ddae6bbc1c8d4bff153b8ac8e925c4184120ea | |
parent | 00968d1ba03c0603440fe5a765b87869b99a0a93 (diff) |
Make synutils compile
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | utils/synutils/Makefile.am | 14 | ||||
-rw-r--r-- | utils/synutils/alignment.h | 2 | ||||
-rw-r--r-- | utils/synutils/constituent_reorder_model.cc | 6 | ||||
-rw-r--r-- | utils/synutils/srl_sentence.h | 5 | ||||
-rw-r--r-- | utils/synutils/tree.h | 4 | ||||
-rw-r--r-- | utils/synutils/tsuruoka_maxent.h | 10 | ||||
-rw-r--r-- | utils/synutils/utility.h | 2 |
10 files changed, 28 insertions, 28 deletions
@@ -192,6 +192,7 @@ utils/phmt utils/reconstruct_weights utils/small_vector_test utils/sv_test +utils/synutils/const_reorder_model_trainer utils/ts utils/weights_test training/crf/mpi_adagrad_optimize diff --git a/Makefile.am b/Makefile.am index 88327477..ce49799a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,8 @@ # cyclic dependencies between these directories! SUBDIRS = \ utils \ + utils/synutils/maxent-3.0 \ + utils/synutils \ klm/util/double-conversion \ klm/util \ klm/util/stream \ @@ -21,4 +23,3 @@ EXTRA_DIST = corpus tests python/cdec python/tests python/examples compound-spli AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -D_GLIBCXX_PARALLEL -march=native -mtune=native -O2 -pipe -fomit-frame-pointer -Wall - diff --git a/configure.ac b/configure.ac index c5575f14..e1ec47ee 100644 --- a/configure.ac +++ b/configure.ac @@ -5,9 +5,9 @@ AM_INIT_AUTOMAKE AC_CONFIG_HEADERS(config.h) AC_PROG_LIBTOOL AC_PROG_LEX -case $LEX in -:) AC_MSG_ERROR([No lex (Flex, lex, etc.) program found]);; -esac +case $LEX in +:) AC_MSG_ERROR([No lex (Flex, lex, etc.) program found]);; +esac OLD_CXXFLAGS=$CXXFLAGS AC_PROG_CC AC_PROG_CXX @@ -208,6 +208,8 @@ fi # core cdec stuff AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([utils/Makefile]) +AC_CONFIG_FILES([utils/synutils/maxent-3.0/Makefile]) +AC_CONFIG_FILES([utils/synutils/Makefile]) AC_CONFIG_FILES([mteval/Makefile]) AC_CONFIG_FILES([mteval/meteor_jar.cc]) AC_CONFIG_FILES([decoder/Makefile]) @@ -240,4 +242,3 @@ AC_CONFIG_FILES([training/dtrain/Makefile]) AC_CONFIG_FILES([example_extff/Makefile]) AC_OUTPUT - diff --git a/utils/synutils/Makefile.am b/utils/synutils/Makefile.am index f87f1f8a..ac76be40 100644 --- a/utils/synutils/Makefile.am +++ b/utils/synutils/Makefile.am @@ -1,16 +1,6 @@ bin_PROGRAMS = const_reorder_model_trainer const_reorder_model_trainer_SOURCES = constituent_reorder_model.cc -const_reorder_model_trainer_LDADD = libfeature.a maxent-3.0/libtsuruoka_maxent.a -lgfortran +const_reorder_model_trainer_LDADD = maxent-3.0/libtsuruoka_maxent.a -noinst_LIBRARIES = libfeature.a - -libfeature_a_SOURCES = \ - alignment.h \ - srl_sentence.h \ - tree.h \ - utility.h \ - argument_reorder_model.h \ - tsuruoka_maxent.h - -AM_CPPFLAGS = -W -Wall -I$(top_srcdir) -I$(top_srcdir)/utils -I$(top_srcdir)/synutils/maxent-3.0 +AM_CPPFLAGS = -W -Wall -I$(top_srcdir) diff --git a/utils/synutils/alignment.h b/utils/synutils/alignment.h index c0648aab..6abd12bc 100644 --- a/utils/synutils/alignment.h +++ b/utils/synutils/alignment.h @@ -13,7 +13,7 @@ #include <stdio.h> #include <string.h> -#include "stringlib.h" +#include "utils/stringlib.h" using namespace std; diff --git a/utils/synutils/constituent_reorder_model.cc b/utils/synutils/constituent_reorder_model.cc index a4fb9627..78d61b90 100644 --- a/utils/synutils/constituent_reorder_model.cc +++ b/utils/synutils/constituent_reorder_model.cc @@ -12,12 +12,12 @@ #include "utility.h" #include "tsuruoka_maxent.h" -#include <tr1/unordered_map> +#include <unordered_map> using namespace std; -typedef std::tr1::unordered_map<std::string, int> Map; -typedef std::tr1::unordered_map<std::string, int>::iterator Iterator; +typedef std::unordered_map<std::string, int> Map; +typedef std::unordered_map<std::string, int>::iterator Iterator; namespace po = boost::program_options; diff --git a/utils/synutils/srl_sentence.h b/utils/synutils/srl_sentence.h index c08cc065..1afdec45 100644 --- a/utils/synutils/srl_sentence.h +++ b/utils/synutils/srl_sentence.h @@ -8,10 +8,13 @@ #ifndef SRL_SENTENCE_H_ #define SRL_SENTENCE_H_ -#include "tree.h" +#include <sstream> #include <vector> +#include "tree.h" +#include "utils/stringlib.h" + using namespace std; struct SArgument { diff --git a/utils/synutils/tree.h b/utils/synutils/tree.h index 32521a3a..8070f828 100644 --- a/utils/synutils/tree.h +++ b/utils/synutils/tree.h @@ -8,10 +8,12 @@ #ifndef TREE_H_ #define TREE_H_ -#include <string> #include <assert.h> #include <stdio.h> +#include <string> +#include <vector> + using namespace std; struct STreeItem { diff --git a/utils/synutils/tsuruoka_maxent.h b/utils/synutils/tsuruoka_maxent.h index b5a87404..89b06b97 100644 --- a/utils/synutils/tsuruoka_maxent.h +++ b/utils/synutils/tsuruoka_maxent.h @@ -7,19 +7,19 @@ #define TSURUOKA_MAXENT_H_ #include "utility.h" -#include "stringlib.h" -#include "maxent-3.0/maxent.h" +#include "utils/stringlib.h" +#include "utils/synutils/maxent-3.0/maxent.h" #include <assert.h> #include <vector> #include <string> #include <string.h> -#include <tr1/unordered_map> +#include <unordered_map> using namespace std; -typedef std::tr1::unordered_map<std::string, int> Map; -typedef std::tr1::unordered_map<std::string, int>::iterator Iterator; +typedef std::unordered_map<std::string, int> Map; +typedef std::unordered_map<std::string, int>::iterator Iterator; struct Tsuruoka_Maxent { Tsuruoka_Maxent(const char* pszModelFName) { diff --git a/utils/synutils/utility.h b/utils/synutils/utility.h index 791b2286..ef7b78b7 100644 --- a/utils/synutils/utility.h +++ b/utils/synutils/utility.h @@ -13,6 +13,8 @@ #include <assert.h> #include <stdlib.h> #include <string.h> + +#include <string> #include <unordered_map> using namespace std; |