diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2011-11-29 12:50:53 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2011-11-29 12:50:53 +0400 |
commit | 75e55e85d729272857790864a6011120cda97f38 (patch) | |
tree | fff3c86cfd845455b7e43bd24d169a5b978e8a3f /lm | |
parent | e564bfd5ccea3040459c30749105259807a02749 (diff) | |
parent | 17f8ab23b7a724fb0ba5f90a723218918b1783ff (diff) |
Merge branch 'master' of github.com:moses-smt/mosesdecoder
Diffstat (limited to 'lm')
-rw-r--r-- | lm/Jamfile | 13 | ||||
-rw-r--r-- | lm/binary_format.cc | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lm/Jamfile b/lm/Jamfile index dbf18a556..19cbaec4b 100644 --- a/lm/Jamfile +++ b/lm/Jamfile @@ -1,9 +1,12 @@ -lib lm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc virtual_interface.cc vocab.cc ../util//util : <include>.. : : <include>.. ; +lib kenlm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc virtual_interface.cc vocab.cc ../util//kenutil : <include>.. : : <include>.. ; import testing ; -run left_test.cc lm ..//boost_unit_test_framework : : test.arpa ; -run model_test.cc lm ..//boost_unit_test_framework : : test.arpa test_nounk.arpa ; +run left_test.cc kenlm ..//boost_unit_test_framework : : test.arpa ; +run model_test.cc kenlm ..//boost_unit_test_framework : : test.arpa test_nounk.arpa ; -exe query : ngram_query.cc lm ; -exe build_binary : build_binary.cc lm ; +exe query : ngram_query.cc kenlm ; +exe build_binary : build_binary.cc kenlm ; + +install legacy : build_binary query + : <location>$(TOP)/lm <install-type>EXE <install-dependencies>on <link>shared:<dll-path>$(TOP)/lm <link>shared:<install-type>LIB ; diff --git a/lm/binary_format.cc b/lm/binary_format.cc index 05a0dff03..ab0166a65 100644 --- a/lm/binary_format.cc +++ b/lm/binary_format.cc @@ -48,7 +48,7 @@ struct Sanity { void SetToReference() { std::memset(this, 0, sizeof(Sanity)); - std::memcpy(magic, kMagicBytes, sizeof(magic)); + std::memcpy(magic, kMagicBytes, sizeof(kMagicBytes)); zero_f = 0.0; one_f = 1.0; minus_half_f = -0.5; one_word_index = 1; max_word_index = std::numeric_limits<WordIndex>::max(); |