public class RecognitionResult extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
RecognitionResult.LinesResult |
| Modifier and Type | Field and Description |
|---|---|
Language |
language
The language of the recognized text in the image.
|
ArrayList<Rectangle> |
recognitionAreasRectangles
Deprecated.
Will be removed in the release 25.10.0
|
ArrayList<String> |
recognitionAreasText
Deprecated.
Will be removed in the release 25.10.0
|
ArrayList<char[]> |
recognitionCharactersList
A set of characters found by the recognition algorithm and arranged in descending order of probability.
|
ArrayList<RecognitionResult.LinesResult> |
recognitionLinesResult
Gets a list of recognition results with a list of rows (Rectangles).
|
String |
recognitionText
Recognition result of all page or one area.
|
double |
skew
Deprecated.
Will be removed in the release 25.11.0
|
ArrayList<String> |
warnings
Gets or sets list of the warnings messages describing non-critical faults
appeared during generation.
|
| Constructor and Description |
|---|
RecognitionResult()
Initializes a new instance of the
|
| Modifier and Type | Method and Description |
|---|---|
RecognitionResult |
add(RecognitionResult other) |
RecognitionResult |
clone() |
String |
GetJson()
Form JSON string with recognition results.
|
HashMap<String,RecognitionResult.LinesResult> |
GetKeywords()
Get keywords from pasport (Test mode.
|
String |
getSpellCheckCorrectedText()
Corrects text (replaces misspelled words).
|
String |
getSpellCheckCorrectedText(SpellCheckLanguage language)
Corrects text (replaces misspelled words).
|
List<SpellCheckError> |
getSpellCheckErrorList()
Find the misspelled words with suggested spellings for a given input text.
|
List<SpellCheckError> |
getSpellCheckErrorList(SpellCheckLanguage language)
Find the misspelled words with suggested spellings for a given input text.
|
String |
GetXml()
Form JSON string with recognition results.
|
void |
save(String fullFileName)
Saves the document in the plain text
|
void |
save(String fullFileName,
Format format)
Saves the document in the plain text or other document format.
|
void |
save(String fullFileName,
Format format,
PdfOptimizationMode optimizePdf)
Saves the document in the plain text or other document format.
|
void |
saveSpellCheckCorrectedText(String fullFileName,
Format format)
Saves the corrected with English dictionary text in the document in the plain text or Microsoft Word
Text Document format.
|
void |
saveSpellCheckCorrectedText(String fullFileName,
Format format,
SpellCheckLanguage language)
Saves the corrected text in the document in the plain text or other format.
|
void |
SetKeyword(String key,
RecognitionResult.LinesResult result) |
void |
useUserDictionary(String dictionaryPath)
Allows to use own dictionary for spell-check correction.
|
@Deprecated public ArrayList<String> recognitionAreasText
public ArrayList<RecognitionResult.LinesResult> recognitionLinesResult
public String recognitionText
@Deprecated public ArrayList<Rectangle> recognitionAreasRectangles
public ArrayList<char[]> recognitionCharactersList
@Deprecated public double skew
public Language language
Language.AUTO, Language.MULTILANGUAGE,
or Language.UNIVERSAL is selected.public RecognitionResult()
class.public String GetJson()
public String GetXml()
public void save(String fullFileName)
fullFileName - Filename with a path for saving recognition resultpublic void save(String fullFileName, Format format)
fullFileName - Filename with a path for saving recognition result.format - Document format enum type of Format.public void save(String fullFileName, Format format, PdfOptimizationMode optimizePdf)
fullFileName - Filename with a path for saving recognition result.format - Document format enum type of Format.optimizePdf - Reduce the PDF file size by lowering the quality of background images. By default, the original image quality is preserved.public void saveSpellCheckCorrectedText(String fullFileName, Format format, SpellCheckLanguage language)
fullFileName - Filename with a path for saving recognition result.format - Document format enum type of Format.language - Dictionary for spell check.public void saveSpellCheckCorrectedText(String fullFileName, Format format)
fullFileName - Filename with a path for saving recognition result.format - Document format enum type of Format.public String getSpellCheckCorrectedText(SpellCheckLanguage language)
language - Dictionary to use.public String getSpellCheckCorrectedText()
public List<SpellCheckError> getSpellCheckErrorList(SpellCheckLanguage language)
language - Dictionary to use.public List<SpellCheckError> getSpellCheckErrorList()
public void useUserDictionary(String dictionaryPath)
dictionaryPath - Full 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.public HashMap<String,RecognitionResult.LinesResult> GetKeywords()
public void SetKeyword(String key, RecognitionResult.LinesResult result)
public RecognitionResult add(RecognitionResult other)
public RecognitionResult clone()
Copyright © 2025 Aspose. All rights reserved.