diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 57e18884df8a2323c42bff4e35625e077abe87b3..56d8bbb72ae85a73a883a63b973c9df5ba517703 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -338,7 +338,7 @@ static inline void prof_out(void) {
 #define MAX_POINTER_COUNT_G 2
 
 // (MAX_PREV_WORD_COUNT_FOR_N_GRAM + 1)-gram is supported.
-#define MAX_PREV_WORD_COUNT_FOR_N_GRAM 1
+#define MAX_PREV_WORD_COUNT_FOR_N_GRAM 2
 
 #define DISALLOW_DEFAULT_CONSTRUCTOR(TypeName) \
   TypeName() = delete