Where is /path/to/eng.user-words?

153 views
Skip to first unread message

이경준

unread,
Apr 2, 2018, 4:08:21 AM4/2/18
to tesseract-ocr
Hi ..


I incited this page .

I cannot find (lang).user-words .

How can I find? 


Tesseract config files consist of lines with variable-value pairs (space separated). The variables are documented as flags in the source code like the following one in tesseractclass.h:

STRING_VAR_H(tessedit_char_blacklist, "", "Blacklist of chars not to recognize");

These variables may enable or disable various features of the engine, and may cause it to load (or not load) various data. For instance, let’s suppose you want to OCR in English, but suppress the normal dictionary and load an alternative word list and an alternative list of patterns — these two files are the most commonly used extra data files.

If your language pack is in /path/to/eng.traineddata and the hocr config is in /path/to/configs/hocr then create three new files:

/path/to/eng.user-words:

the
quick
brown
fox
jumped

/path/to/eng.user-patterns:

1-\d\d\d-GOOG-411
www.\n\\\*.com

/path/to/configs/bazaar:

load_system_dawg     F
load_freq_dawg       F
user_words_suffix    user-words
user_patterns_suffix user-patterns

Now, if you pass the word bazaar as a trailing command line parameter to Tesseract, Tesseract will not bother loading the system dictionary nor the dictionary of frequent words and will load and use the eng.user-words and eng.user-patterns files you provided. The former is a simple word list, one per line. The format of the latter is documented in dict/trie.h on read_pattern_list().

george...@gmail.com

unread,
Apr 26, 2018, 9:26:54 AM4/26/18
to tesseract-ocr
You make your own in the same directory your eng.traineddata is.

My folder structure looks like this:

Reply all
Reply to author
Forward
0 new messages