Skip to content

Commit

Permalink
Fixed issue 1243
Browse files Browse the repository at this point in the history
  • Loading branch information
theraysmith committed Sep 18, 2014
1 parent 3c21c14 commit 0256529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,10 @@ void TessBaseAPI::ClearPersistentCache() {
int TessBaseAPI::IsValidWord(const char *word) {
return tesseract_->getDict().valid_word(word);
}
// Returns true if utf8_character is defined in the UniCharset.
bool TessBaseAPI::IsValidCharacter(const char *utf8_character) {
return tesseract_->unicharset.contains_unichar(utf8_character);
}


// TODO(rays) Obsolete this function and replace with a more aptly named
Expand Down
3 changes: 3 additions & 0 deletions api/baseapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ class TESS_API TessBaseAPI {
* in a separate API at some future time.
*/
int IsValidWord(const char *word);
// Returns true if utf8_character is defined in the UniCharset.
bool IsValidCharacter(const char *utf8_character);


bool GetTextDirection(int* out_offset, float* out_slope);

Expand Down

0 comments on commit 0256529

Please sign in to comment.