Skip to content

Instantly share code, notes, and snippets.

@sorenlouv
Last active December 20, 2015 20:39
Show Gist options
  • Save sorenlouv/6192085 to your computer and use it in GitHub Desktop.
Save sorenlouv/6192085 to your computer and use it in GitHub Desktop.
Adds confidence parameter for Tesseract Can be added to Homebrew Formula: /usr/local/Library/Formula/tesseract.rb Read more about Homebrew patches: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook#patches
--- /api/baseapi.cpp
+++ /api/baseapi.cpp
@@ -1041,6 +1041,7 @@
hocr_str->add_str_int(" ", top);
hocr_str->add_str_int(" ", right);
hocr_str->add_str_int(" ", bottom);
+ hocr_str->add_str_int("; x_wconf ", ((LTRResultIterator*)it)->Confidence(level));
*hocr_str += "\">";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment