cloudmersive-ocr-api-client 1.4.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/docs/BusinessCardRecognitionResult.md +8 -8
  4. data/docs/FieldResult.md +2 -2
  5. data/docs/FormDefinitionTemplate.md +2 -1
  6. data/docs/FormFieldDefinition.md +13 -13
  7. data/docs/FormRecognitionResult.md +3 -2
  8. data/docs/FormTableColumnDefinition.md +13 -0
  9. data/docs/FormTableDefinition.md +11 -0
  10. data/docs/ImageOcrApi.md +5 -3
  11. data/docs/ImageToLinesWithLocationResult.md +1 -1
  12. data/docs/ImageToWordsWithLocationResult.md +1 -1
  13. data/docs/OcrPageResultWithLinesWithLocation.md +1 -1
  14. data/docs/OcrPageResultWithWordsWithLocation.md +1 -1
  15. data/docs/OcrPhotoTextElement.md +1 -0
  16. data/docs/PdfToLinesWithLocationResult.md +2 -2
  17. data/docs/PdfToTextResponse.md +2 -2
  18. data/docs/PdfToWordsWithLocationResult.md +2 -2
  19. data/docs/PhotoToWordsWithLocationResult.md +1 -1
  20. data/docs/Point.md +9 -0
  21. data/docs/PreprocessingApi.md +55 -0
  22. data/docs/ReceiptLineItem.md +2 -2
  23. data/docs/ReceiptRecognitionResult.md +8 -8
  24. data/docs/TableCellResult.md +9 -0
  25. data/docs/TableResult.md +9 -0
  26. data/docs/TableRowResult.md +8 -0
  27. data/lib/cloudmersive-ocr-api-client.rb +6 -0
  28. data/lib/cloudmersive-ocr-api-client/api/image_ocr_api.rb +6 -3
  29. data/lib/cloudmersive-ocr-api-client/api/preprocessing_api.rb +56 -0
  30. data/lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb +8 -0
  31. data/lib/cloudmersive-ocr-api-client/models/field_result.rb +2 -0
  32. data/lib/cloudmersive-ocr-api-client/models/form_definition_template.rb +17 -4
  33. data/lib/cloudmersive-ocr-api-client/models/form_field_definition.rb +13 -0
  34. data/lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb +18 -4
  35. data/lib/cloudmersive-ocr-api-client/models/form_table_column_definition.rb +239 -0
  36. data/lib/cloudmersive-ocr-api-client/models/form_table_definition.rb +221 -0
  37. data/lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb +1 -0
  38. data/lib/cloudmersive-ocr-api-client/models/image_to_words_with_location_result.rb +1 -0
  39. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_lines_with_location.rb +11 -10
  40. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_words_with_location.rb +11 -10
  41. data/lib/cloudmersive-ocr-api-client/models/ocr_photo_text_element.rb +13 -1
  42. data/lib/cloudmersive-ocr-api-client/models/pdf_to_lines_with_location_result.rb +2 -0
  43. data/lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb +2 -0
  44. data/lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb +2 -0
  45. data/lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb +1 -0
  46. data/lib/cloudmersive-ocr-api-client/models/point.rb +199 -0
  47. data/lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb +2 -0
  48. data/lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb +8 -0
  49. data/lib/cloudmersive-ocr-api-client/models/table_cell_result.rb +201 -0
  50. data/lib/cloudmersive-ocr-api-client/models/table_result.rb +201 -0
  51. data/lib/cloudmersive-ocr-api-client/models/table_row_result.rb +191 -0
  52. data/lib/cloudmersive-ocr-api-client/version.rb +1 -1
  53. data/spec/api/image_ocr_api_spec.rb +2 -1
  54. data/spec/api/preprocessing_api_spec.rb +12 -0
  55. data/spec/models/form_definition_template_spec.rb +6 -0
  56. data/spec/models/form_recognition_result_spec.rb +6 -0
  57. data/spec/models/form_table_column_definition_spec.rb +72 -0
  58. data/spec/models/form_table_definition_spec.rb +60 -0
  59. data/spec/models/ocr_page_result_with_lines_with_location_spec.rb +2 -2
  60. data/spec/models/ocr_page_result_with_words_with_location_spec.rb +2 -2
  61. data/spec/models/ocr_photo_text_element_spec.rb +6 -0
  62. data/spec/models/point_spec.rb +48 -0
  63. data/spec/models/table_cell_result_spec.rb +48 -0
  64. data/spec/models/table_result_spec.rb +48 -0
  65. data/spec/models/table_row_result_spec.rb +42 -0
  66. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 316f1c944a6eefef693a48d0fccf2f55451d019cd4d1ac6d55f43a585a211d86
4
- data.tar.gz: 9d3049879d84d9f776c16651859cd59325fcedda5f646830676c25f2f9a09870
3
+ metadata.gz: ca2c53e42948b6d1ae8597d4badb4b573fb8e9bdf661319b83bc6a62e7ecaf5f
4
+ data.tar.gz: c80039f487048c1fd30fb40b9cb61328b00b7a7c080e61a69bfe92b2fdbcc62c
5
5
  SHA512:
6
- metadata.gz: 80f7855f040cc9efbe0805210a3e9ef2dff18baaa402e07e137321bf1611285d5be4c01494394bec46929fdfc81f69871b0dead8a05e7dfcd2df4f472062eb57
7
- data.tar.gz: 5c1ba2fac68dda25683805b8af4ee01ace4f84fc574b8c34bf019febb013cddc841ebe3e6f5a3cf8a7ddab8776449ca713cce5b25bdf1564a08eebd885ec1b97
6
+ metadata.gz: 2f0252b2e52b133d8da1ef2a11ddc3d1fa0d828930d7a6c2c53914e5324427d098a6eb9d862d0a909d199db7e382b2a0478c408597cac0c31a457d8297684d50
7
+ data.tar.gz: c5bac0390c43fbad905cd4f03fc7667444dd76e57aa7373a3c422917bf38b280a301c4775c58745f65504b57dfe4356503ef4c8528a71a397a6745ef05239cd2
data/README.md CHANGED
@@ -7,7 +7,7 @@ The powerful Optical Character Recognition (OCR) APIs let you convert scanned im
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 1.4.0
10
+ - Package version: 1.4.2
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-ocr-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-ocr-api-client-1.4.0.gem
26
+ gem install ./cloudmersive-ocr-api-client-1.4.2.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-ocr-api-client-1.4.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-ocr-api-client-1.4.2.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-ocr-api-client', '~> 1.4.0'
34
+ gem 'cloudmersive-ocr-api-client', '~> 1.4.2'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -102,6 +102,7 @@ Class | Method | HTTP request | Description
102
102
  *CloudmersiveOcrApiClient::PreprocessingApi* | [**preprocessing_binarize_advanced**](docs/PreprocessingApi.md#preprocessing_binarize_advanced) | **POST** /ocr/preprocessing/image/binarize/advanced | Convert an image of text into a binary (light and dark) view with ML
103
103
  *CloudmersiveOcrApiClient::PreprocessingApi* | [**preprocessing_get_page_angle**](docs/PreprocessingApi.md#preprocessing_get_page_angle) | **POST** /ocr/preprocessing/image/get-page-angle | Get the angle of the page / document / receipt
104
104
  *CloudmersiveOcrApiClient::PreprocessingApi* | [**preprocessing_unrotate**](docs/PreprocessingApi.md#preprocessing_unrotate) | **POST** /ocr/preprocessing/image/unrotate | Detect and unrotate a document image
105
+ *CloudmersiveOcrApiClient::PreprocessingApi* | [**preprocessing_unrotate_advanced**](docs/PreprocessingApi.md#preprocessing_unrotate_advanced) | **POST** /ocr/preprocessing/image/unrotate/advanced | Detect and unrotate a document image (advanced)
105
106
  *CloudmersiveOcrApiClient::PreprocessingApi* | [**preprocessing_unskew**](docs/PreprocessingApi.md#preprocessing_unskew) | **POST** /ocr/preprocessing/image/unskew | Detect and unskew a photo of a document
106
107
  *CloudmersiveOcrApiClient::ReceiptsApi* | [**receipts_photo_to_csv**](docs/ReceiptsApi.md#receipts_photo_to_csv) | **POST** /ocr/receipts/photo/to/csv | Convert a photo of a receipt into a CSV file containing structured information from the receipt
107
108
 
@@ -113,6 +114,8 @@ Class | Method | HTTP request | Description
113
114
  - [CloudmersiveOcrApiClient::FormDefinitionTemplate](docs/FormDefinitionTemplate.md)
114
115
  - [CloudmersiveOcrApiClient::FormFieldDefinition](docs/FormFieldDefinition.md)
115
116
  - [CloudmersiveOcrApiClient::FormRecognitionResult](docs/FormRecognitionResult.md)
117
+ - [CloudmersiveOcrApiClient::FormTableColumnDefinition](docs/FormTableColumnDefinition.md)
118
+ - [CloudmersiveOcrApiClient::FormTableDefinition](docs/FormTableDefinition.md)
116
119
  - [CloudmersiveOcrApiClient::GetPageAngleResult](docs/GetPageAngleResult.md)
117
120
  - [CloudmersiveOcrApiClient::ImageToLinesWithLocationResult](docs/ImageToLinesWithLocationResult.md)
118
121
  - [CloudmersiveOcrApiClient::ImageToTextResponse](docs/ImageToTextResponse.md)
@@ -127,8 +130,12 @@ Class | Method | HTTP request | Description
127
130
  - [CloudmersiveOcrApiClient::PdfToTextResponse](docs/PdfToTextResponse.md)
128
131
  - [CloudmersiveOcrApiClient::PdfToWordsWithLocationResult](docs/PdfToWordsWithLocationResult.md)
129
132
  - [CloudmersiveOcrApiClient::PhotoToWordsWithLocationResult](docs/PhotoToWordsWithLocationResult.md)
133
+ - [CloudmersiveOcrApiClient::Point](docs/Point.md)
130
134
  - [CloudmersiveOcrApiClient::ReceiptLineItem](docs/ReceiptLineItem.md)
131
135
  - [CloudmersiveOcrApiClient::ReceiptRecognitionResult](docs/ReceiptRecognitionResult.md)
136
+ - [CloudmersiveOcrApiClient::TableCellResult](docs/TableCellResult.md)
137
+ - [CloudmersiveOcrApiClient::TableResult](docs/TableResult.md)
138
+ - [CloudmersiveOcrApiClient::TableRowResult](docs/TableRowResult.md)
132
139
 
133
140
 
134
141
  ## Documentation for Authorization
@@ -3,13 +3,13 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **person_name** | **String** | | [optional]
8
- **person_title** | **String** | | [optional]
9
- **business_name** | **String** | | [optional]
10
- **address_string** | **String** | | [optional]
11
- **phone_number** | **String** | | [optional]
12
- **email_address** | **String** | | [optional]
13
- **timestamp** | **DateTime** | | [optional]
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **person_name** | **String** | The name of the person printed on the business card (if included on the business card) | [optional]
8
+ **person_title** | **String** | The title of the person printed on the business card (if included on the business card) | [optional]
9
+ **business_name** | **String** | The name of the business printed on the business card (if included on the business card) | [optional]
10
+ **address_string** | **String** | The address printed on the business card (if included on the business card) | [optional]
11
+ **phone_number** | **String** | The phone number printed on the business card (if included on the business card) | [optional]
12
+ **email_address** | **String** | The email address printed on the business card (if included on the business card) | [optional]
13
+ **timestamp** | **DateTime** | The date and time printed on the business card (if included on the business card) | [optional]
14
14
 
15
15
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **target_field** | [**FormFieldDefinition**](FormFieldDefinition.md) | | [optional]
7
- **field_values** | [**Array<OcrPhotoTextElement>**](OcrPhotoTextElement.md) | | [optional]
6
+ **target_field** | [**FormFieldDefinition**](FormFieldDefinition.md) | Target field to extract from the form | [optional]
7
+ **field_values** | [**Array<OcrPhotoTextElement>**](OcrPhotoTextElement.md) | Result field value(s) extracted | [optional]
8
8
 
9
9
 
@@ -3,6 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **field_definitions** | [**Array<FormFieldDefinition>**](FormFieldDefinition.md) | | [optional]
6
+ **field_definitions** | [**Array<FormFieldDefinition>**](FormFieldDefinition.md) | Field definitions in the template; a field is comprised of a key/value pair | [optional]
7
+ **table_definitions** | [**Array<FormTableDefinition>**](FormTableDefinition.md) | Table definitions in the template; a table is comprised of columns and rows and exists in a 2-dimensional layout; a common example of a table would be an invoice | [optional]
7
8
 
8
9
 
@@ -3,18 +3,18 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **field_id** | **String** | | [optional]
7
- **left_anchor** | **String** | | [optional]
8
- **top_anchor** | **String** | | [optional]
9
- **anchor_mode** | **String** | | [optional]
10
- **data_type** | **String** | | [optional]
11
- **target_digit_count** | **Integer** | | [optional]
12
- **minimum_character_count** | **Integer** | | [optional]
13
- **allow_numeric_digits** | **BOOLEAN** | | [optional]
14
- **vertical_alignment_type** | **String** | | [optional]
15
- **horizontal_alignment_type** | **String** | | [optional]
16
- **target_field_width_relative** | **Float** | | [optional]
17
- **target_field_height_relative** | **Float** | | [optional]
18
- **ignore** | **Array<String>** | | [optional]
6
+ **field_id** | **String** | The identifier of the field; use this to identify which field is being referenced | [optional]
7
+ **left_anchor** | **String** | Optional - the left-hand anchor of the field | [optional]
8
+ **top_anchor** | **String** | Optional - the top anchor of the field | [optional]
9
+ **anchor_mode** | **String** | Optional - the matching mode for the anchor. Possible values are Complete (requires the entire anchor to match) and Partial (allows only part of the anchor to match). Default is Partial. | [optional]
10
+ **data_type** | **String** | The data type of the field; possible values are INTEGER (Integer value), STRING (Arbitrary string value, spaces are permitted), DATE (Date in a structured format), DECIMAL (Decimal number), ALPHANUMERIC (Continuous alphanumeric string with no spaces), STRINGNOWHITESPACE (A string that contains no whitespace characters), SERIALNUMBER (A serial-number style string that contains letters and numbers, and certain symbols; must contain at least one number), ALPHAONLY (Alphabet characters only, no numbers or symbols or whitespace) | [optional]
11
+ **target_digit_count** | **Integer** | Optional - the target number of digits in the field; useful for fixed-length fields | [optional]
12
+ **minimum_character_count** | **Integer** | Optional - the target number of digits in the field; useful for fixed-length fields | [optional]
13
+ **allow_numeric_digits** | **BOOLEAN** | Optional - set to false to block values that contain numeric digits, set to true to allow numeric digits | [optional]
14
+ **vertical_alignment_type** | **String** | Vertical alignment of target value area relative to the field anchor; Possible values are VCenter, Top, Bottom | [optional]
15
+ **horizontal_alignment_type** | **String** | Horizontal alignment of target value area relative to the field anchor; Possible values are Left, Right | [optional]
16
+ **target_field_width_relative** | **Float** | Optional - scale factor for target field width - relative to width of field title; a value of 1.0 indicates the target value area has the same width as the field value as occurring in the image; a value of 2.0 would indicate that the target value area has 2 times the width of the field value as occurring in the image. | [optional]
17
+ **target_field_height_relative** | **Float** | Optional - scale factor for target field height - relative to height of field title | [optional]
18
+ **ignore** | **Array<String>** | Optional - Ignore any result items that contain a partial or complete match with these text strings | [optional]
19
19
 
20
20
 
@@ -3,7 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **field_value_extraction_result** | [**Array<FieldResult>**](FieldResult.md) | | [optional]
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **field_value_extraction_result** | [**Array<FieldResult>**](FieldResult.md) | Result of form field OCR data extraction | [optional]
8
+ **table_value_extraction_results** | [**Array<TableResult>**](TableResult.md) | Result of form table OCR data extraction | [optional]
8
9
 
9
10
 
@@ -0,0 +1,13 @@
1
+ # CloudmersiveOcrApiClient::FormTableColumnDefinition
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **column_id** | **String** | The identifier of the field; use this to identify which field is being referenced | [optional]
7
+ **top_anchor** | **String** | Optional - the top anchor of the column heading | [optional]
8
+ **anchor_mode** | **String** | Optional - the matching mode for the anchor. Possible values are Complete (requires the entire anchor to match) and Partial (allows only part of the anchor to match). Default is Partial. | [optional]
9
+ **data_type** | **String** | The data type of the field; possible values are INTEGER (Integer value), STRING (Arbitrary string value, spaces are permitted), DATE (Date in a structured format), DECIMAL (Decimal number), ALPHANUMERIC (Continuous alphanumeric string with no spaces), STRINGNOWHITESPACE (A string that contains no whitespace characters), SERIALNUMBER (A serial-number style string that contains letters and numbers, and certain symbols; must contain at least one number), ALPHAONLY (Alphabet characters only, no numbers or symbols or whitespace) | [optional]
10
+ **minimum_character_count** | **Integer** | Optional - the target number of digits in the field; useful for fixed-length fields | [optional]
11
+ **allow_numeric_digits** | **BOOLEAN** | Optional - set to false to block values that contain numeric digits, set to true to allow numeric digits | [optional]
12
+
13
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveOcrApiClient::FormTableDefinition
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **table_id** | **String** | Optional; the ID of the table | [optional]
7
+ **column_definitions** | [**Array<FormTableColumnDefinition>**](FormTableColumnDefinition.md) | Definition of the columns in the table | [optional]
8
+ **target_table_height_relative** | **Float** | Optional - scale factor for target table height - relative to maximum height of headers of columns | [optional]
9
+ **target_row_height_relative** | **Float** | Optional - scale factor for target row height - relative to height of column header | [optional]
10
+
11
+
@@ -214,6 +214,7 @@ image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on
214
214
  opts = {
215
215
  form_template_definition: "form_template_definition_example", # String | Form field definitions
216
216
  recognition_mode: "recognition_mode_example", # String | Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
217
+ preprocessing: "preprocessing_example", # String | Optional, preprocessing mode, default is 'Auto'. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image - including automatic unrotation of the image - before OCR is applied; this is recommended). Set this to 'None' if you do not want to use automatic image unrotation and enhancement.
217
218
  language: "language_example" # String | Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
218
219
  }
219
220
 
@@ -233,6 +234,7 @@ Name | Type | Description | Notes
233
234
  **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
234
235
  **form_template_definition** | **String**| Form field definitions | [optional]
235
236
  **recognition_mode** | **String**| Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled. | [optional]
237
+ **preprocessing** | **String**| Optional, preprocessing mode, default is 'Auto'. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image - including automatic unrotation of the image - before OCR is applied; this is recommended). Set this to 'None' if you do not want to use automatic image unrotation and enhancement. | [optional]
236
238
  **language** | **String**| Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish) | [optional]
237
239
 
238
240
  ### Return type
@@ -274,9 +276,9 @@ api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
274
276
  image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
275
277
 
276
278
  opts = {
277
- form_template_definition: "form_template_definition_example", # String | Form field definitions
278
279
  recognition_mode: "recognition_mode_example", # String | Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
279
- language: "language_example" # String | Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
280
+ language: "language_example", # String | Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish)
281
+ preprocessing: "preprocessing_example" # String | Optional, preprocessing mode, default is 'None'. Possible values are None (no preprocessing of the image), and 'Advanced' (automatic image enhancement of the image before OCR is applied; this is recommended and needed to handle rotated receipts).
280
282
  }
281
283
 
282
284
  begin
@@ -293,9 +295,9 @@ end
293
295
  Name | Type | Description | Notes
294
296
  ------------- | ------------- | ------------- | -------------
295
297
  **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
296
- **form_template_definition** | **String**| Form field definitions | [optional]
297
298
  **recognition_mode** | **String**| Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled. | [optional]
298
299
  **language** | **String**| Optional, language of the input document, default is English (ENG). Possible values are ENG (English), ARA (Arabic), ZHO (Chinese - Simplified), ZHO-HANT (Chinese - Traditional), ASM (Assamese), AFR (Afrikaans), AMH (Amharic), AZE (Azerbaijani), AZE-CYRL (Azerbaijani - Cyrillic), BEL (Belarusian), BEN (Bengali), BOD (Tibetan), BOS (Bosnian), BUL (Bulgarian), CAT (Catalan; Valencian), CEB (Cebuano), CES (Czech), CHR (Cherokee), CYM (Welsh), DAN (Danish), DEU (German), DZO (Dzongkha), ELL (Greek), ENM (Archaic/Middle English), EPO (Esperanto), EST (Estonian), EUS (Basque), FAS (Persian), FIN (Finnish), FRA (French), FRK (Frankish), FRM (Middle-French), GLE (Irish), GLG (Galician), GRC (Ancient Greek), HAT (Hatian), HEB (Hebrew), HIN (Hindi), HRV (Croatian), HUN (Hungarian), IKU (Inuktitut), IND (Indonesian), ISL (Icelandic), ITA (Italian), ITA-OLD (Old - Italian), JAV (Javanese), JPN (Japanese), KAN (Kannada), KAT (Georgian), KAT-OLD (Old-Georgian), KAZ (Kazakh), KHM (Central Khmer), KIR (Kirghiz), KOR (Korean), KUR (Kurdish), LAO (Lao), LAT (Latin), LAV (Latvian), LIT (Lithuanian), MAL (Malayalam), MAR (Marathi), MKD (Macedonian), MLT (Maltese), MSA (Malay), MYA (Burmese), NEP (Nepali), NLD (Dutch), NOR (Norwegian), ORI (Oriya), PAN (Panjabi), POL (Polish), POR (Portuguese), PUS (Pushto), RON (Romanian), RUS (Russian), SAN (Sanskrit), SIN (Sinhala), SLK (Slovak), SLV (Slovenian), SPA (Spanish), SPA-OLD (Old Spanish), SQI (Albanian), SRP (Serbian), SRP-LAT (Latin Serbian), SWA (Swahili), SWE (Swedish), SYR (Syriac), TAM (Tamil), TEL (Telugu), TGK (Tajik), TGL (Tagalog), THA (Thai), TIR (Tigrinya), TUR (Turkish), UIG (Uighur), UKR (Ukrainian), URD (Urdu), UZB (Uzbek), UZB-CYR (Cyrillic Uzbek), VIE (Vietnamese), YID (Yiddish) | [optional]
300
+ **preprocessing** | **String**| Optional, preprocessing mode, default is 'None'. Possible values are None (no preprocessing of the image), and 'Advanced' (automatic image enhancement of the image before OCR is applied; this is recommended and needed to handle rotated receipts). | [optional]
299
301
 
300
302
  ### Return type
301
303
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
7
  **lines** | [**Array<OcrLineElement>**](OcrLineElement.md) | Words in the image | [optional]
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
7
  **words** | [**Array<OcrWordElement>**](OcrWordElement.md) | Word elements in the image | [optional]
8
8
 
9
9
 
@@ -3,8 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
6
  **page_number** | **Integer** | Page number of the page that was OCR-ed, starting with 1 for the first page in the PDF file | [optional]
7
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
8
8
  **lines** | [**Array<OcrLineElement>**](OcrLineElement.md) | Word elements in the image | [optional]
9
9
 
10
10
 
@@ -3,8 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
6
  **page_number** | **Integer** | Page number of the page that was OCR-ed, starting with 1 for the first page in the PDF file | [optional]
7
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
8
8
  **words** | [**Array<OcrWordElement>**](OcrWordElement.md) | Word elements in the image | [optional]
9
9
 
10
10
 
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **y_top** | **Integer** | Y location of the top edge of the word in pixels | [optional]
9
9
  **width** | **Integer** | Width of the word in pixels | [optional]
10
10
  **height** | **Integer** | Height of the word in pixels | [optional]
11
+ **bounding_points** | [**Array<Point>**](Point.md) | Points that form the bounding polygon around the text | [optional]
11
12
  **confidence_level** | **Float** | Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy) | [optional]
12
13
 
13
14
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **ocr_pages** | [**Array<OcrPageResultWithLinesWithLocation>**](OcrPageResultWithLinesWithLocation.md) | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **ocr_pages** | [**Array<OcrPageResultWithLinesWithLocation>**](OcrPageResultWithLinesWithLocation.md) | OCR results for each page | [optional]
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **ocr_pages** | [**Array<OcrPageResult>**](OcrPageResult.md) | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **ocr_pages** | [**Array<OcrPageResult>**](OcrPageResult.md) | Page OCR results | [optional]
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **ocr_pages** | [**Array<OcrPageResultWithWordsWithLocation>**](OcrPageResultWithWordsWithLocation.md) | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
+ **ocr_pages** | [**Array<OcrPageResultWithWordsWithLocation>**](OcrPageResultWithWordsWithLocation.md) | OCR page results | [optional]
8
8
 
9
9
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
6
+ **successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
7
7
  **text_elements** | [**Array<OcrPhotoTextElement>**](OcrPhotoTextElement.md) | Word elements in the image | [optional]
8
8
  **diagnostic_image** | **String** | Typically null. To analyze OCR performance, enable diagnostic mode by adding the HTTP header \"DiagnosticMode\" with the value \"true\". When this is true, a diagnostic image showing the details of the OCR result will be set in PNG format into DiagnosticImage. | [optional]
9
9
 
@@ -0,0 +1,9 @@
1
+ # CloudmersiveOcrApiClient::Point
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **x** | **Integer** | X location in 2D in the image, where 0 represents the left edge of the image | [optional]
7
+ **y** | **Integer** | Y location in 2D in the image, where 0 represents the top edge of the image | [optional]
8
+
9
+
@@ -8,6 +8,7 @@ Method | HTTP request | Description
8
8
  [**preprocessing_binarize_advanced**](PreprocessingApi.md#preprocessing_binarize_advanced) | **POST** /ocr/preprocessing/image/binarize/advanced | Convert an image of text into a binary (light and dark) view with ML
9
9
  [**preprocessing_get_page_angle**](PreprocessingApi.md#preprocessing_get_page_angle) | **POST** /ocr/preprocessing/image/get-page-angle | Get the angle of the page / document / receipt
10
10
  [**preprocessing_unrotate**](PreprocessingApi.md#preprocessing_unrotate) | **POST** /ocr/preprocessing/image/unrotate | Detect and unrotate a document image
11
+ [**preprocessing_unrotate_advanced**](PreprocessingApi.md#preprocessing_unrotate_advanced) | **POST** /ocr/preprocessing/image/unrotate/advanced | Detect and unrotate a document image (advanced)
11
12
  [**preprocessing_unskew**](PreprocessingApi.md#preprocessing_unskew) | **POST** /ocr/preprocessing/image/unskew | Detect and unskew a photo of a document
12
13
 
13
14
 
@@ -227,6 +228,60 @@ Name | Type | Description | Notes
227
228
 
228
229
 
229
230
 
231
+ # **preprocessing_unrotate_advanced**
232
+ > String preprocessing_unrotate_advanced(image_file)
233
+
234
+ Detect and unrotate a document image (advanced)
235
+
236
+ Detect and unrotate an image of a document (e.g. that was scanned at an angle) using deep learning. Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
237
+
238
+ ### Example
239
+ ```ruby
240
+ # load the gem
241
+ require 'cloudmersive-ocr-api-client'
242
+ # setup authorization
243
+ CloudmersiveOcrApiClient.configure do |config|
244
+ # Configure API key authorization: Apikey
245
+ config.api_key['Apikey'] = 'YOUR API KEY'
246
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
247
+ #config.api_key_prefix['Apikey'] = 'Bearer'
248
+ end
249
+
250
+ api_instance = CloudmersiveOcrApiClient::PreprocessingApi.new
251
+
252
+ image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
253
+
254
+
255
+ begin
256
+ #Detect and unrotate a document image (advanced)
257
+ result = api_instance.preprocessing_unrotate_advanced(image_file)
258
+ p result
259
+ rescue CloudmersiveOcrApiClient::ApiError => e
260
+ puts "Exception when calling PreprocessingApi->preprocessing_unrotate_advanced: #{e}"
261
+ end
262
+ ```
263
+
264
+ ### Parameters
265
+
266
+ Name | Type | Description | Notes
267
+ ------------- | ------------- | ------------- | -------------
268
+ **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
269
+
270
+ ### Return type
271
+
272
+ **String**
273
+
274
+ ### Authorization
275
+
276
+ [Apikey](../README.md#Apikey)
277
+
278
+ ### HTTP request headers
279
+
280
+ - **Content-Type**: multipart/form-data
281
+ - **Accept**: application/json, text/json, application/xml, text/xml
282
+
283
+
284
+
230
285
  # **preprocessing_unskew**
231
286
  > String preprocessing_unskew(image_file)
232
287
 
@@ -3,7 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **item_description** | **String** | | [optional]
7
- **item_price** | **Float** | | [optional]
6
+ **item_description** | **String** | Description of the item | [optional]
7
+ **item_price** | **Float** | Price of the item if available | [optional]
8
8
 
9
9
 
@@ -3,13 +3,13 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | | [optional]
7
- **timestamp** | **DateTime** | | [optional]
8
- **business_name** | **String** | | [optional]
9
- **business_website** | **String** | | [optional]
10
- **address_string** | **String** | | [optional]
11
- **phone_number** | **String** | | [optional]
12
- **receipt_items** | [**Array<ReceiptLineItem>**](ReceiptLineItem.md) | | [optional]
13
- **receipt_total** | **Float** | | [optional]
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **timestamp** | **DateTime** | The date and time printed on the receipt (if included on the receipt) | [optional]
8
+ **business_name** | **String** | The name of the business printed on the receipt (if included on the receipt) | [optional]
9
+ **business_website** | **String** | The website URL of the business printed on the receipt (if included on the receipt) | [optional]
10
+ **address_string** | **String** | The address of the business printed on the receipt (if included on the receipt) | [optional]
11
+ **phone_number** | **String** | The phone number printed on the receipt (if included on the receipt) | [optional]
12
+ **receipt_items** | [**Array<ReceiptLineItem>**](ReceiptLineItem.md) | The individual line items comprising the order; does not include total (see ReceiptTotal) | [optional]
13
+ **receipt_total** | **Float** | The total monetary value of the receipt (if included on the receipt) | [optional]
14
14
 
15
15
 
@@ -0,0 +1,9 @@
1
+ # CloudmersiveOcrApiClient::TableCellResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **column_id** | **String** | The ID of the column | [optional]
7
+ **cell_values** | [**Array<OcrPhotoTextElement>**](OcrPhotoTextElement.md) | Result cell value(s) extracted | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveOcrApiClient::TableResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **table_definition** | [**FormTableDefinition**](FormTableDefinition.md) | The input table definition for reference | [optional]
7
+ **table_rows_result** | [**Array<TableRowResult>**](TableRowResult.md) | Rows of data in the table | [optional]
8
+
9
+