about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--kgramstats.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kgramstats.cpp b/kgramstats.cpp index 30d4407..37830e4 100644 --- a/kgramstats.cpp +++ b/kgramstats.cpp
@@ -396,7 +396,7 @@ void rawr::compile(int maxK)
396 int corpid = 0; 396 int corpid = 0;
397 for (auto corpus : tokens) 397 for (auto corpus : tokens)
398 { 398 {
399 for (int k=1; k<maxK; k++) 399 for (int k=1; k<maxK && k<corpus.size(); k++)
400 { 400 {
401 for (int i=0; i<(corpus.size() - k); i++) 401 for (int i=0; i<(corpus.size() - k); i++)
402 { 402 {