Aspose.OCR for Python via Java API docs
Loading...
Searching...
No Matches

The results of the image recognition. More...

Public Member Functions

 __init__ (self, javaClass)
 
 get_json (self)
 Form JSON string with recognition results.
 
str get_spell_check_corrected_text (self, SpellCheckLanguage language)
 Corrects text (replaces misspelled words).
 
 get_spell_check_error_list (self, SpellCheckLanguage language=SpellCheckLanguage.ENG)
 Find the misspelled words with suggested spellings for a given input text.
 
 get_xml (self)
 Form JSON string with recognition results.
 
 getJavaClass (self)
 
 init (self)
 
 save (self, str fullFileName, Format format)
 Saves the document in the plain text or other document format.
 
 save_spell_check_corrected_text (self, str fullFileName, Format format, SpellCheckLanguage language=SpellCheckLanguage.ENG)
 Corrects text (replaces misspelled words).
 
 use_user_dictionary (self, str dictionaryPath)
 Allows to use own dictionary for spell-check correction.
 

Static Public Member Functions

 save_multipage_document (self, str fullPath)
 Private.
 

Public Attributes

 recognition_areas_rectangles
 
 recognition_areas_text
 
 recognition_characters_list
 
 recognition_lines_result
 
 recognition_text
 
 skew
 
 warnings
 

Detailed Description

The results of the image recognition.

Contains elements with recognition information and methods for result export.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  javaClass 
)

Member Function Documentation

◆ get_json()

get_json (   self)

Form JSON string with recognition results.

Returns
: Recognition results as JSON string.

◆ get_spell_check_corrected_text()

str get_spell_check_corrected_text (   self,
SpellCheckLanguage  language 
)

Corrects text (replaces misspelled words).

Parameters
languageDictionary to use.
Returns
: Corrected recognition results string.

◆ get_spell_check_error_list()

get_spell_check_error_list (   self,
SpellCheckLanguage   language = SpellCheckLanguage.ENG 
)

Find the misspelled words with suggested spellings for a given input text.

Parameters
languageDictionary to use.
Returns
: List of SpellCheckError object representing misspelled words with lists suggested correct spellings for the each misspelled word, and with the edit distance.

◆ get_xml()

get_xml (   self)

Form JSON string with recognition results.

Returns
: Recognition results as XML string.

◆ getJavaClass()

getJavaClass (   self)

◆ init()

init (   self)

◆ save()

save (   self,
str  fullFileName,
Format  format 
)

Saves the document in the plain text or other document format.

Parameters
fullFileNameFilename with a path for saving recognition result.
formatDocument format enum type of Format.

◆ save_multipage_document()

save_multipage_document (   self,
str  fullPath 
)
static

Private.

◆ save_spell_check_corrected_text()

save_spell_check_corrected_text (   self,
str  fullFileName,
Format  format,
SpellCheckLanguage   language = SpellCheckLanguage.ENG 
)

Corrects text (replaces misspelled words).

Saves the corrected text in the document in the plain text or other format.

Parameters
fullFileNameFilename with a path for saving recognition result
formatDocument format enum type of Format.
languageDictionary for spell check.

◆ use_user_dictionary()

use_user_dictionary (   self,
str  dictionaryPath 
)

Allows to use own dictionary for spell-check correction.

Parameters
dictionaryPathFull path to the user dictionary (frequency dictionary). Dictionary file format: Plain text file in UTF-8 encoding. Word and Word Frequency are separated by comma, the word is expected in the first column and the frequency in the second column. Every word-frequency-pair in a separate line.A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed("\r\n"). Every word is expected to be in lower case. Example:
word,5984819
hello,5761742
down,5582768

Member Data Documentation

◆ recognition_areas_rectangles

recognition_areas_rectangles

◆ recognition_areas_text

recognition_areas_text

◆ recognition_characters_list

recognition_characters_list

◆ recognition_lines_result

recognition_lines_result

◆ recognition_text

recognition_text

◆ skew

skew

◆ warnings

warnings