diff options
author | Chris Dyer <redpony@gmail.com> | 2015-03-03 01:14:07 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2015-03-03 01:14:07 -0500 |
commit | 95183b5760d7f168ae093ae8f9b29740628a278f (patch) | |
tree | 4c213e940a80a08d60141d11ec35cbe8f17d4755 /training/minrisk | |
parent | c7b2a39958912d7b85a384a871609e6db73042c7 (diff) |
migration to cmake
Diffstat (limited to 'training/minrisk')
-rw-r--r-- | training/minrisk/CMakeLists.txt | 9 | ||||
-rw-r--r-- | training/minrisk/Makefile.am | 8 | ||||
-rw-r--r-- | training/minrisk/minrisk_optimize.cc | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/training/minrisk/CMakeLists.txt b/training/minrisk/CMakeLists.txt new file mode 100644 index 00000000..0795bc54 --- /dev/null +++ b/training/minrisk/CMakeLists.txt @@ -0,0 +1,9 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../utils) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../utils) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../mteval) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../decoder) + +set(minrisk_optimize_SRCS minrisk_optimize.cc) +add_executable(minrisk_optimize ${minrisk_optimize_SRCS}) +target_link_libraries(minrisk_optimize training_utils libcdec mteval utils lbfgs ${Boost_LIBRARIES} z) diff --git a/training/minrisk/Makefile.am b/training/minrisk/Makefile.am deleted file mode 100644 index ebf6fa91..00000000 --- a/training/minrisk/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -bin_PROGRAMS = minrisk_optimize - -minrisk_optimize_SOURCES = minrisk_optimize.cc -minrisk_optimize_LDADD = ../../training/utils/libtraining_utils.a ../../decoder/libcdec.a ../../mteval/libmteval.a ../../utils/libutils.a ../../training/liblbfgs/liblbfgs.a - -EXTRA_DIST = minrisk.pl minrisk_generate_input.pl - -AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/utils -I$(top_srcdir)/decoder -I$(top_srcdir)/mteval -I$(top_srcdir)/training -I$(top_srcdir)/training/utils diff --git a/training/minrisk/minrisk_optimize.cc b/training/minrisk/minrisk_optimize.cc index a2938fb0..f90c7118 100644 --- a/training/minrisk/minrisk_optimize.cc +++ b/training/minrisk/minrisk_optimize.cc @@ -163,7 +163,7 @@ int main(int argc, char** argv) { cerr << "Loading hypergraphs...\n"; while(getline(in, line)) { istringstream is(line); - int sent_id; + int sent_id = 0; kis.resize(kis.size() + 1); training::CandidateSet& curkbest = kis.back(); string kbest_file; |