diff options
Diffstat (limited to 'klm/lm')
-rw-r--r-- | klm/lm/CMakeLists.txt | 129 | ||||
-rw-r--r-- | klm/lm/Makefile.am | 63 | ||||
-rw-r--r-- | klm/lm/builder/CMakeLists.txt | 31 | ||||
-rw-r--r-- | klm/lm/builder/Makefile.am | 34 |
4 files changed, 160 insertions, 97 deletions
diff --git a/klm/lm/CMakeLists.txt b/klm/lm/CMakeLists.txt new file mode 100644 index 00000000..5814b623 --- /dev/null +++ b/klm/lm/CMakeLists.txt @@ -0,0 +1,129 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..) + +set(build_binary_SRCS build_binary_main.cc) +add_executable(build_binary ${build_binary_SRCS}) +target_link_libraries(build_binary klm klm_util klm_util_double z) + + +set(ngram_query_SRCS query_main.cc) +add_executable(ngram_query ${ngram_query_SRCS}) +target_link_libraries(ngram_query klm klm_util klm_util_double z) + +set(klm_STAT_SRCS + bhiksha.hh + binary_format.hh + blank.hh + config.hh + enumerate_vocab.hh + facade.hh + left.hh + lm_exception.hh + max_order.hh + model.hh + model_type.hh + ngram_query.hh + partial.hh + quantize.hh + read_arpa.hh + return.hh + search_hashed.hh + search_trie.hh + sizes.hh + state.hh + trie.hh + trie_sort.hh + value.hh + value_build.hh + virtual_interface.hh + vocab.hh + weights.hh + word_index.hh + bhiksha.cc + binary_format.cc + config.cc + lm_exception.cc + quantize.cc + model.cc + read_arpa.cc + search_hashed.cc + search_trie.cc + sizes.cc + trie.cc + trie_sort.cc + value_build.cc + virtual_interface.cc + vocab.cc) + +add_library(klm STATIC ${klm_STAT_SRCS}) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#bin_PROGRAMS = build_binary ngram_query +# +#build_binary_SOURCES = build_binary_main.cc +#build_binary_LDADD = libklm.a ../util/libklm_util.a ../util/double-conversion/libklm_util_double.a -lz +# +#ngram_query_SOURCES = query_main.cc +#ngram_query_LDADD = libklm.a ../util/libklm_util.a ../util/double-conversion/libklm_util_double.a -lz +# +##noinst_PROGRAMS = \ +## ngram_test +##TESTS = ngram_test +##ngram_test_SOURCES = ngram_test.cc +##ngram_test_LDADD = ../util/libklm_util.a +# +#noinst_LIBRARIES = libklm.a +# +#libklm_a_SOURCES = \ +# bhiksha.hh \ +# binary_format.hh \ +# blank.hh \ +# config.hh \ +# enumerate_vocab.hh \ +# facade.hh \ +# left.hh \ +# lm_exception.hh \ +# max_order.hh \ +# model.hh \ +# model_type.hh \ +# ngram_query.hh \ +# partial.hh \ +# quantize.hh \ +# read_arpa.hh \ +# return.hh \ +# search_hashed.hh \ +# search_trie.hh \ +# sizes.hh \ +# state.hh \ +# trie.hh \ +# trie_sort.hh \ +# value.hh \ +# value_build.hh \ +# virtual_interface.hh \ +# vocab.hh \ +# weights.hh \ +# word_index.hh \ +# bhiksha.cc \ +# binary_format.cc \ +# config.cc \ +# lm_exception.cc \ +# quantize.cc \ +# model.cc \ +# read_arpa.cc \ +# search_hashed.cc \ +# search_trie.cc \ +# sizes.cc \ +# trie.cc \ +# trie_sort.cc \ +# value_build.cc \ +# virtual_interface.cc \ +# vocab.cc +# +#AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/klm +# diff --git a/klm/lm/Makefile.am b/klm/lm/Makefile.am deleted file mode 100644 index 48b0ba34..00000000 --- a/klm/lm/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -bin_PROGRAMS = build_binary ngram_query - -build_binary_SOURCES = build_binary_main.cc -build_binary_LDADD = libklm.a ../util/libklm_util.a ../util/double-conversion/libklm_util_double.a -lz - -ngram_query_SOURCES = query_main.cc -ngram_query_LDADD = libklm.a ../util/libklm_util.a ../util/double-conversion/libklm_util_double.a -lz - -#noinst_PROGRAMS = \ -# ngram_test -#TESTS = ngram_test -#ngram_test_SOURCES = ngram_test.cc -#ngram_test_LDADD = ../util/libklm_util.a - -noinst_LIBRARIES = libklm.a - -libklm_a_SOURCES = \ - bhiksha.hh \ - binary_format.hh \ - blank.hh \ - config.hh \ - enumerate_vocab.hh \ - facade.hh \ - left.hh \ - lm_exception.hh \ - max_order.hh \ - model.hh \ - model_type.hh \ - ngram_query.hh \ - partial.hh \ - quantize.hh \ - read_arpa.hh \ - return.hh \ - search_hashed.hh \ - search_trie.hh \ - sizes.hh \ - state.hh \ - trie.hh \ - trie_sort.hh \ - value.hh \ - value_build.hh \ - virtual_interface.hh \ - vocab.hh \ - weights.hh \ - word_index.hh \ - bhiksha.cc \ - binary_format.cc \ - config.cc \ - lm_exception.cc \ - quantize.cc \ - model.cc \ - read_arpa.cc \ - search_hashed.cc \ - search_trie.cc \ - sizes.cc \ - trie.cc \ - trie_sort.cc \ - value_build.cc \ - virtual_interface.cc \ - vocab.cc - -AM_CPPFLAGS = -W -Wall -Wno-sign-compare -I$(top_srcdir)/klm - diff --git a/klm/lm/builder/CMakeLists.txt b/klm/lm/builder/CMakeLists.txt new file mode 100644 index 00000000..5fb1b2d2 --- /dev/null +++ b/klm/lm/builder/CMakeLists.txt @@ -0,0 +1,31 @@ +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..) + +set(lmplz_SRCS + lmplz_main.cc + adjust_counts.cc + adjust_counts.hh + corpus_count.cc + corpus_count.hh + discount.hh + hash_gamma.hh + header_info.hh + initial_probabilities.cc + initial_probabilities.hh + interpolate.cc + interpolate.hh + joint_order.hh + multi_stream.hh + ngram.hh + ngram_stream.hh + pipeline.cc + pipeline.hh + print.cc + print.hh + sort.hh) + +add_executable(lmplz ${lmplz_SRCS}) +target_link_libraries(lmplz klm klm_util_double klm_util_stream klm_util ${Boost_LIBRARIES}) + +set(dump_counts_SRCS print.cc dump_counts_main.cc) +add_executable(dump_counts ${dump_counts_SRCS}) +target_link_libraries(dump_counts klm klm_util_double klm_util_stream klm_util ${Boost_LIBRARIES}) diff --git a/klm/lm/builder/Makefile.am b/klm/lm/builder/Makefile.am deleted file mode 100644 index bb15ff04..00000000 --- a/klm/lm/builder/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -bin_PROGRAMS = lmplz dump_counts - -dump_counts_SOURCES = \ - print.cc \ - dump_counts_main.cc - -lmplz_SOURCES = \ - lmplz_main.cc \ - adjust_counts.cc \ - adjust_counts.hh \ - corpus_count.cc \ - corpus_count.hh \ - discount.hh \ - hash_gamma.hh \ - header_info.hh \ - initial_probabilities.cc \ - initial_probabilities.hh \ - interpolate.cc \ - interpolate.hh \ - joint_order.hh \ - multi_stream.hh \ - ngram.hh \ - ngram_stream.hh \ - pipeline.cc \ - pipeline.hh \ - print.cc \ - print.hh \ - sort.hh - -dump_counts_LDADD = ../libklm.a ../../util/double-conversion/libklm_util_double.a ../../util/stream/libklm_util_stream.a ../../util/libklm_util.a $(BOOST_THREAD_LIBS) -lmplz_LDADD = ../libklm.a ../../util/double-conversion/libklm_util_double.a ../../util/stream/libklm_util_stream.a ../../util/libklm_util.a $(BOOST_THREAD_LIBS) - -AM_CPPFLAGS = -W -Wall -I$(top_srcdir)/klm - |