diff --git a/torch_modules/src/CNNNetwork.cpp b/torch_modules/src/CNNNetwork.cpp
index 9f9d6a1598a33f0be2f321dc00542b19562f2c58..96c6b2826e6cbf60b3be7be0bf6e566bbed038b7 100644
--- a/torch_modules/src/CNNNetwork.cpp
+++ b/torch_modules/src/CNNNetwork.cpp
@@ -112,7 +112,7 @@ std::vector<std::vector<long>> CNNNetworkImpl::extractContext(Config & config, D
 
         if (is_training())
           if (col == "FORM" || col == "LEMMA")
-            if (dict.getNbOccs(dictIndex) < unknownValueThreshold)
+            if (dict.getNbOccs(dictIndex) <= unknownValueThreshold)
             {
               context.emplace_back(context.back());
               context.back().back() = dict.getIndexOrInsert(Dict::unknownValueStr);