summaryrefslogtreecommitdiff
path: root/klm/lm/ngram_query.cc
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-05-16 13:24:08 -0700
committerChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-05-26 22:59:54 -0400
commit149232c38eec558ddb1097698d1570aacb67b59f (patch)
tree5860b4d6f681eeb04a1020cbb2fe7e6ac394af99 /klm/lm/ngram_query.cc
parent01ecc09f8e3a82c32bf7dd2f90c12554becea71d (diff)
Big kenlm change includes lower order models for probing only. And other stuff.
Diffstat (limited to 'klm/lm/ngram_query.cc')
-rw-r--r--klm/lm/ngram_query.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/klm/lm/ngram_query.cc b/klm/lm/ngram_query.cc
index 8f7a0e1c..49757d9a 100644
--- a/klm/lm/ngram_query.cc
+++ b/klm/lm/ngram_query.cc
@@ -12,22 +12,24 @@ int main(int argc, char *argv[]) {
ModelType model_type;
if (RecognizeBinary(argv[1], model_type)) {
switch(model_type) {
- case HASH_PROBING:
+ case PROBING:
Query<lm::ngram::ProbingModel>(argv[1], sentence_context, std::cin, std::cout);
break;
- case TRIE_SORTED:
+ case REST_PROBING:
+ Query<lm::ngram::RestProbingModel>(argv[1], sentence_context, std::cin, std::cout);
+ break;
+ case TRIE:
Query<TrieModel>(argv[1], sentence_context, std::cin, std::cout);
break;
- case QUANT_TRIE_SORTED:
+ case QUANT_TRIE:
Query<QuantTrieModel>(argv[1], sentence_context, std::cin, std::cout);
break;
- case ARRAY_TRIE_SORTED:
+ case ARRAY_TRIE:
Query<ArrayTrieModel>(argv[1], sentence_context, std::cin, std::cout);
break;
- case QUANT_ARRAY_TRIE_SORTED:
+ case QUANT_ARRAY_TRIE:
Query<QuantArrayTrieModel>(argv[1], sentence_context, std::cin, std::cout);
break;
- case HASH_SORTED:
default:
std::cerr << "Unrecognized kenlm model type " << model_type << std::endl;
abort();
@@ -35,8 +37,8 @@ int main(int argc, char *argv[]) {
} else {
Query<ProbingModel>(argv[1], sentence_context, std::cin, std::cout);
}
-
- PrintUsage("Total time including destruction:\n");
+ std::cerr << "Total time including destruction:\n";
+ util::PrintUsage(std::cerr);
} catch (const std::exception &e) {
std::cerr << e.what() << std::endl;
return 1;