summaryrefslogtreecommitdiff
path: root/klm/lm/ngram_build_binary.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-18 23:24:01 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-18 23:24:01 +0000
commite0ef743090038ee02d656cee11debd2246624ba0 (patch)
treee5e1d32402c8dcb490c574e24c087c56d4cc172e /klm/lm/ngram_build_binary.cc
parent0c2514868f58bbfe422aa275e2905182cf2f57eb (diff)
kenneth's LM preliminary integration
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@681 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'klm/lm/ngram_build_binary.cc')
-rw-r--r--klm/lm/ngram_build_binary.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/klm/lm/ngram_build_binary.cc b/klm/lm/ngram_build_binary.cc
new file mode 100644
index 00000000..9dab30a1
--- /dev/null
+++ b/klm/lm/ngram_build_binary.cc
@@ -0,0 +1,13 @@
+#include "lm/ngram.hh"
+
+#include <iostream>
+
+int main(int argc, char *argv[]) {
+ if (argc != 3) {
+ std::cerr << "Usage: " << argv[0] << " input.arpa output.mmap" << std::endl;
+ return 1;
+ }
+ lm::ngram::Config config;
+ config.write_mmap = argv[2];
+ lm::ngram::Model(argv[1], config);
+}