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 |
---|---|
recognitionAreasText | List recognition results of a list of areas (Rectangles). |
recognitionLinesResult | Gets a list of recognition results with a list of rows (Rectangles). |
recognitionText | Recognition result of all page or one area. |
recognitionAreasRectangles | 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. |
skew | List recognition results of a list of areas (Rectangles). |
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. |
GetXml() | Form JSON string with recognition results. |
save(String fullFileName) | Saves the document in the plain text |
save(String fullFileName, Format format) | Saves 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 Microsoft Word Text 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. |
getSpellCheckCorrectedText(SpellCheck.SpellCheckLanguage language) | Corrects text (replaces misspelled words). |
getSpellCheckCorrectedText() | Corrects text (replaces misspelled words). |
getSpellCheckErrorList(SpellCheck.SpellCheckLanguage language) | Find the misspelled words with suggested spellings for a given input text. |
getSpellCheckErrorList() | Find the misspelled words with suggested spellings for a given input text. |
useUserDictionary(String dictionaryPath) | Allows to use own dictionary for spell-check correction. |
add(RecognitionResult other) | |
clone() |
RecognitionResult()
public RecognitionResult()
Initializes a new instance of the
recognitionAreasText
public ArrayList<String> recognitionAreasText
List recognition results of a list of areas (Rectangles).
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.
recognitionAreasRectangles
public ArrayList<Rectangle> recognitionAreasRectangles
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.
skew
public double skew
List recognition results of a list of areas (Rectangles).
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.
GetXml()
public String GetXml()
Form JSON string with recognition results.
Returns: java.lang.String - Recognition results as JSON string.
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 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 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. |
language | SpellCheckLanguage | Dictionary for spell check |
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. |
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.
getSpellCheckCorrectedText()
public String getSpellCheckCorrectedText()
Corrects text (replaces misspelled words).
Returns: java.lang.String - Corrected recognition results string. Default English dictionary.
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.
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.
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. |
add(RecognitionResult other)
public RecognitionResult add(RecognitionResult other)
Parameters:
Parameter | Type | Description |
---|---|---|
other | RecognitionResult |
Returns: RecognitionResult
clone()
public RecognitionResult clone()
Returns: RecognitionResult