RecognitionResult
Inheritance: java.lang.Object
public class RecognitionResult
The results of the image recognition. Contains elements with recognition information and methods for result export.
Constructors
Constructor | Description |
---|---|
RecognitionResult() | Initializes a new instance of the |
Fields
Field | Description |
---|---|
recognitionAreasRectangles | List recognition results of a list of areas (Rectangles). |
recognitionAreasText | List recognition results of a list of areas (Rectangles). |
recognitionCharactersList | A set of characters found by the recognition algorithm and arranged in descending order of probability. |
recognitionLinesResult | Gets a list of recognition results with a list of rows (Rectangles). |
recognitionText | Recognition result of all page or one area. |
skew | Skew angle of the image. |
warnings | Gets or sets list of the warnings messages describing non-critical faults appeared during generation. |
Methods
Method | Description |
---|---|
GetJson() | Form JSON string with recognition results. |
GetKeywords() | Get keywords from pasport (Test mode. |
GetXml() | Form JSON string with recognition results. |
SetKeyword(String key, RecognitionResult.LinesResult result) | |
add(RecognitionResult other) | |
clone() | |
equals(Object arg0) | |
getClass() | |
getSpellCheckCorrectedText() | Corrects text (replaces misspelled words). |
getSpellCheckCorrectedText(SpellCheck.SpellCheckLanguage language) | Corrects text (replaces misspelled words). |
getSpellCheckErrorList() | Find the misspelled words with suggested spellings for a given input text. |
getSpellCheckErrorList(SpellCheck.SpellCheckLanguage language) | Find the misspelled words with suggested spellings for a given input text. |
hashCode() | |
notify() | |
notifyAll() | |
save(String fullFileName) | Saves the document in the plain text |
save(String fullFileName, Format format) | Saves the document in the plain text or other document format. |
save(String fullFileName, Format format, PdfOptimizationMode optimizePdf) | Saves the document in the plain text or other document format. |
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. |
saveSpellCheckCorrectedText(String fullFileName, Format format, SpellCheck.SpellCheckLanguage language) | Saves the corrected text in the document in the plain text or other format. |
toString() | |
useUserDictionary(String dictionaryPath) | Allows to use own dictionary for spell-check correction. |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
RecognitionResult()
public RecognitionResult()
Initializes a new instance of the
recognitionAreasRectangles
public ArrayList<Rectangle> recognitionAreasRectangles
List recognition results of a list of areas (Rectangles).
recognitionAreasText
public ArrayList<String> recognitionAreasText
List recognition results of a list of areas (Rectangles).
recognitionCharactersList
public ArrayList<char[]> recognitionCharactersList
A set of characters found by the recognition algorithm and arranged in descending order of probability.
recognitionLinesResult
public ArrayList<RecognitionResult.LinesResult> recognitionLinesResult
Gets a list of recognition results with a list of rows (Rectangles).
recognitionText
public String recognitionText
Recognition result of all page or one area.
skew
public double skew
Skew angle of the image.
warnings
public ArrayList<String> warnings
Gets or sets list of the warnings messages describing non-critical faults appeared during generation.
GetJson()
public String GetJson()
Form JSON string with recognition results.
Returns: java.lang.String - Recognition results as JSON string.
GetKeywords()
public HashMap<String,RecognitionResult.LinesResult> GetKeywords()
Get keywords from pasport (Test mode. Works only for USA and MADAGASCAR passports).
Returns: java.util.HashMap<java.lang.String,com.aspose.ocr.RecognitionResult.LinesResult> - Dictionary with keyword as a key and LinesResult as a value.
GetXml()
public String GetXml()
Form JSON string with recognition results.
Returns: java.lang.String - Recognition results as XML string.
SetKeyword(String key, RecognitionResult.LinesResult result)
public void SetKeyword(String key, RecognitionResult.LinesResult result)
Parameters:
Parameter | Type | Description |
---|---|---|
key | java.lang.String | |
result | LinesResult |
add(RecognitionResult other)
public RecognitionResult add(RecognitionResult other)
Parameters:
Parameter | Type | Description |
---|---|---|
other | RecognitionResult |
Returns: RecognitionResult
clone()
public RecognitionResult clone()
Returns: RecognitionResult
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getSpellCheckCorrectedText()
public String getSpellCheckCorrectedText()
Corrects text (replaces misspelled words).
Returns: java.lang.String - Corrected recognition results string. Default English dictionary.
getSpellCheckCorrectedText(SpellCheck.SpellCheckLanguage language)
public String getSpellCheckCorrectedText(SpellCheck.SpellCheckLanguage language)
Corrects text (replaces misspelled words).
Parameters:
Parameter | Type | Description |
---|---|---|
language | SpellCheckLanguage | Dictionary to use. |
Returns: java.lang.String - Corrected recognition results string.
getSpellCheckErrorList()
public List<SpellCheck.SpellCheckError> getSpellCheckErrorList()
Find the misspelled words with suggested spellings for a given input text. Default English dictionary.
Returns: java.util.List<com.aspose.ocr.SpellCheck.SpellCheckError> - ArrayList of SpellCheckError object representing misspelled words with lists suggested correct spellings for the each misspelled word, and with the edit distance.
getSpellCheckErrorList(SpellCheck.SpellCheckLanguage language)
public List<SpellCheck.SpellCheckError> getSpellCheckErrorList(SpellCheck.SpellCheckLanguage language)
Find the misspelled words with suggested spellings for a given input text.
Parameters:
Parameter | Type | Description |
---|---|---|
language | SpellCheckLanguage | Dictionary to use. |
Returns: java.util.List<com.aspose.ocr.SpellCheck.SpellCheckError> - ArrayList of SpellCheckError object representing misspelled words with lists suggested correct spellings for the each misspelled word, and with the edit distance.
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
save(String fullFileName)
public void save(String fullFileName)
Saves the document in the plain text
Parameters:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result |
save(String fullFileName, Format format)
public void save(String fullFileName, Format format)
Saves the document in the plain text or other document format.
Parameters:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result. |
format | Format | Document format enum type of Format. |
save(String fullFileName, Format format, PdfOptimizationMode optimizePdf)
public void save(String fullFileName, Format format, PdfOptimizationMode optimizePdf)
Saves the document in the plain text or other document format.
Parameters:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result. |
format | Format | Document format enum type of Format. |
optimizePdf | PdfOptimizationMode | Reduce the PDF file size by lowering the quality of background images. By default, the original image quality is preserved. |
saveSpellCheckCorrectedText(String fullFileName, Format format)
public 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.
Parameters:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result. |
format | Format | Document format enum type of Format. |
saveSpellCheckCorrectedText(String fullFileName, Format format, SpellCheck.SpellCheckLanguage language)
public void saveSpellCheckCorrectedText(String fullFileName, Format format, SpellCheck.SpellCheckLanguage language)
Saves the corrected text in the document in the plain text or other format.
Parameters:
Parameter | Type | Description |
---|---|---|
fullFileName | java.lang.String | Filename with a path for saving recognition result. |
format | Format | Document format enum type of Format. |
language | SpellCheckLanguage | Dictionary for spell check. |
toString()
public String toString()
Returns: java.lang.String
useUserDictionary(String dictionaryPath)
public void useUserDictionary(String dictionaryPath)
Allows to use own dictionary for spell-check correction.
Parameters:
Parameter | Type | Description |
---|---|---|
dictionaryPath | java.lang.String | 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. |
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |