From 979f9cafe597305d35e92ee420b1d79fd39ba039 Mon Sep 17 00:00:00 2001 From: zdenop Date: Fri, 16 May 2014 18:35:54 +0000 Subject: [PATCH] Add word recognition language to C-API - fix issue 1200 git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1102 d0cd1f9f-072b-0410-8dd7-cf729c803f20 --- api/capi.cpp | 5 +++++ api/capi.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/capi.cpp b/api/capi.cpp index 99605d27..d07fa3aa 100644 --- a/api/capi.cpp +++ b/api/capi.cpp @@ -742,6 +742,11 @@ TESS_API float TESS_CALL TessResultIteratorConfidence(const TessResultIterator* return handle->Confidence(level); } +TESS_API const char* TESS_CALL TessResultIteratorWordRecognitionLanguage(const TessResultIterator* handle) +{ + return handle->WordRecognitionLanguage(); +} + TESS_API const char* TESS_CALL TessResultIteratorWordFontAttributes(const TessResultIterator* handle, BOOL* is_bold, BOOL* is_italic, BOOL* is_underlined, BOOL* is_monospace, BOOL* is_serif, BOOL* is_smallcaps, int* pointsize, int* font_id) diff --git a/api/capi.h b/api/capi.h index 79eff14e..136cf52f 100644 --- a/api/capi.h +++ b/api/capi.h @@ -356,7 +356,8 @@ TESS_API const TessChoiceIterator* TESS_API BOOL TESS_CALL TessResultIteratorNext(TessResultIterator* handle, TessPageIteratorLevel level); TESS_API char* TESS_CALL TessResultIteratorGetUTF8Text(const TessResultIterator* handle, TessPageIteratorLevel level); TESS_API float TESS_CALL TessResultIteratorConfidence(const TessResultIterator* handle, TessPageIteratorLevel level); - +TESS_API const char* + TESS_CALL TessResultIteratorWordRecognitionLanguage(const TessResultIterator* handle); TESS_API const char* TESS_CALL TessResultIteratorWordFontAttributes(const TessResultIterator* handle, BOOL* is_bold, BOOL* is_italic, BOOL* is_underlined, BOOL* is_monospace, BOOL* is_serif,