diff options
author | Iliyan Malchev <malchev@google.com> | 2008-09-19 08:50:50 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2008-09-19 08:50:50 -0700 |
commit | fc1671c53d52f2af55c4d04d93e31348bf7a8e0e (patch) | |
tree | 4b80fb91700c55b0ec5560a6f2647c5bc87dacad | |
parent | c6dfb0aa630c1cc40dbee3066cf123f7b3fdf064 (diff) | |
download | tesseract-fc1671c53d52f2af55c4d04d93e31348bf7a8e0e.tar.gz |
add #define DISABLE_DOC_DICT to disable the document dictionary
Signed-off-by: Iliyan Malchev <malchev@google.com>
-rwxr-xr-x | Android.mk | 1 | ||||
-rw-r--r-- | dict/permute.cpp | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -227,6 +227,7 @@ LOCAL_SRC_FILES:= \ LOCAL_CFLAGS:=-DGRAPHICS_DISABLED LOCAL_CFLAGS+=-DFST_DISABLED +LOCAL_CFLAGS+=-DDISABLE_DOC_DICT LOCAL_C_INCLUDES+= \ system/tesseract/cutil \ diff --git a/dict/permute.cpp b/dict/permute.cpp index 31f16e9..1b12fc7 100644 --- a/dict/permute.cpp +++ b/dict/permute.cpp @@ -70,8 +70,13 @@ int permutation_count; // Used in metrics.cpp. // TODO(tkielbus) Choose a value for the MAX_NUM_EDGES constant // (or make it dynamic) #define MAX_NUM_EDGES 2000000 +#ifdef DISABLE_DOC_DICT #define MAX_DOC_EDGES 150 #define RESERVED_DOC_EDGES 10 +#else +#define MAX_DOC_EDGES 250000 +#define RESERVED_DOC_EDGES 10000 +#endif #define MAX_USER_EDGES 50000 #define USER_RESERVED_EDGES 2000 /* Weights for adjustment */ @@ -100,8 +105,13 @@ double_VAR(segment_penalty_garbage, GARBAGE_STRING, BOOL_VAR(save_doc_words, 0, "Save Document Words"); + +#ifdef DISABLE_DOC_DICT BOOL_VAR(doc_dict_enable, 0, "Enable Document Dictionary "); +#else +BOOL_VAR(doc_dict_enable, 1, "Enable Document Dictionary "); /* PREV DEFAULT 0 */ +#endif BOOL_VAR(ngram_permuter_activated, FALSE, "Activate character-level n-gram-based permuter"); |