cloudmersive-ocr-api-client 1.4.6 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -109
  3. data/Gemfile +0 -7
  4. data/README.md +0 -150
  5. data/Rakefile +0 -8
  6. data/cloudmersive-ocr-api-client.gemspec +0 -45
  7. data/docs/BusinessCardRecognitionResult.md +0 -15
  8. data/docs/FieldResult.md +0 -9
  9. data/docs/FormDefinitionTemplate.md +0 -9
  10. data/docs/FormFieldDefinition.md +0 -23
  11. data/docs/FormRecognitionResult.md +0 -12
  12. data/docs/FormTableColumnDefinition.md +0 -13
  13. data/docs/FormTableDefinition.md +0 -11
  14. data/docs/GetPageAngleResult.md +0 -9
  15. data/docs/ImageOcrApi.md +0 -565
  16. data/docs/ImageToLinesWithLocationResult.md +0 -9
  17. data/docs/ImageToTextResponse.md +0 -9
  18. data/docs/ImageToWordsWithLocationResult.md +0 -9
  19. data/docs/OcrLineElement.md +0 -9
  20. data/docs/OcrPageResult.md +0 -10
  21. data/docs/OcrPageResultWithLinesWithLocation.md +0 -10
  22. data/docs/OcrPageResultWithWordsWithLocation.md +0 -10
  23. data/docs/OcrPhotoTextElement.md +0 -14
  24. data/docs/OcrWordElement.md +0 -18
  25. data/docs/PdfOcrApi.md +0 -189
  26. data/docs/PdfToLinesWithLocationResult.md +0 -9
  27. data/docs/PdfToTextResponse.md +0 -9
  28. data/docs/PdfToWordsWithLocationResult.md +0 -9
  29. data/docs/PhotoToWordsWithLocationResult.md +0 -10
  30. data/docs/Point.md +0 -9
  31. data/docs/PreprocessingApi.md +0 -338
  32. data/docs/ReceiptLineItem.md +0 -9
  33. data/docs/ReceiptRecognitionResult.md +0 -16
  34. data/docs/ReceiptsApi.md +0 -63
  35. data/docs/TableCellResult.md +0 -9
  36. data/docs/TableResult.md +0 -9
  37. data/docs/TableRowResult.md +0 -8
  38. data/git_push.sh +0 -55
  39. data/lib/cloudmersive-ocr-api-client.rb +0 -70
  40. data/lib/cloudmersive-ocr-api-client/api/image_ocr_api.rb +0 -596
  41. data/lib/cloudmersive-ocr-api-client/api/pdf_ocr_api.rb +0 -209
  42. data/lib/cloudmersive-ocr-api-client/api/preprocessing_api.rb +0 -359
  43. data/lib/cloudmersive-ocr-api-client/api/receipts_api.rb +0 -79
  44. data/lib/cloudmersive-ocr-api-client/api_client.rb +0 -389
  45. data/lib/cloudmersive-ocr-api-client/api_error.rb +0 -38
  46. data/lib/cloudmersive-ocr-api-client/configuration.rb +0 -209
  47. data/lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb +0 -259
  48. data/lib/cloudmersive-ocr-api-client/models/field_result.rb +0 -201
  49. data/lib/cloudmersive-ocr-api-client/models/form_definition_template.rb +0 -203
  50. data/lib/cloudmersive-ocr-api-client/models/form_field_definition.rb +0 -341
  51. data/lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb +0 -235
  52. data/lib/cloudmersive-ocr-api-client/models/form_table_column_definition.rb +0 -239
  53. data/lib/cloudmersive-ocr-api-client/models/form_table_definition.rb +0 -221
  54. data/lib/cloudmersive-ocr-api-client/models/get_page_angle_result.rb +0 -199
  55. data/lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb +0 -201
  56. data/lib/cloudmersive-ocr-api-client/models/image_to_text_response.rb +0 -199
  57. data/lib/cloudmersive-ocr-api-client/models/image_to_words_with_location_result.rb +0 -201
  58. data/lib/cloudmersive-ocr-api-client/models/ocr_line_element.rb +0 -201
  59. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result.rb +0 -209
  60. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_lines_with_location.rb +0 -211
  61. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_words_with_location.rb +0 -211
  62. data/lib/cloudmersive-ocr-api-client/models/ocr_photo_text_element.rb +0 -251
  63. data/lib/cloudmersive-ocr-api-client/models/ocr_word_element.rb +0 -289
  64. data/lib/cloudmersive-ocr-api-client/models/pdf_to_lines_with_location_result.rb +0 -201
  65. data/lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb +0 -201
  66. data/lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb +0 -201
  67. data/lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb +0 -227
  68. data/lib/cloudmersive-ocr-api-client/models/point.rb +0 -199
  69. data/lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb +0 -199
  70. data/lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb +0 -271
  71. data/lib/cloudmersive-ocr-api-client/models/table_cell_result.rb +0 -201
  72. data/lib/cloudmersive-ocr-api-client/models/table_result.rb +0 -201
  73. data/lib/cloudmersive-ocr-api-client/models/table_row_result.rb +0 -191
  74. data/lib/cloudmersive-ocr-api-client/version.rb +0 -15
  75. data/spec/api/image_ocr_api_spec.rb +0 -166
  76. data/spec/api/pdf_ocr_api_spec.rb +0 -77
  77. data/spec/api/preprocessing_api_spec.rb +0 -107
  78. data/spec/api/receipts_api_spec.rb +0 -47
  79. data/spec/api_client_spec.rb +0 -226
  80. data/spec/configuration_spec.rb +0 -42
  81. data/spec/models/business_card_recognition_result_spec.rb +0 -84
  82. data/spec/models/field_result_spec.rb +0 -48
  83. data/spec/models/form_definition_template_spec.rb +0 -48
  84. data/spec/models/form_field_definition_spec.rb +0 -132
  85. data/spec/models/form_recognition_result_spec.rb +0 -66
  86. data/spec/models/form_table_column_definition_spec.rb +0 -72
  87. data/spec/models/form_table_definition_spec.rb +0 -60
  88. data/spec/models/get_page_angle_result_spec.rb +0 -48
  89. data/spec/models/image_to_lines_with_location_result_spec.rb +0 -48
  90. data/spec/models/image_to_text_response_spec.rb +0 -48
  91. data/spec/models/image_to_words_with_location_result_spec.rb +0 -48
  92. data/spec/models/ocr_line_element_spec.rb +0 -48
  93. data/spec/models/ocr_page_result_spec.rb +0 -54
  94. data/spec/models/ocr_page_result_with_lines_with_location_spec.rb +0 -54
  95. data/spec/models/ocr_page_result_with_words_with_location_spec.rb +0 -54
  96. data/spec/models/ocr_photo_text_element_spec.rb +0 -78
  97. data/spec/models/ocr_word_element_spec.rb +0 -102
  98. data/spec/models/pdf_to_lines_with_location_result_spec.rb +0 -48
  99. data/spec/models/pdf_to_text_response_spec.rb +0 -48
  100. data/spec/models/pdf_to_words_with_location_result_spec.rb +0 -48
  101. data/spec/models/photo_to_words_with_location_result_spec.rb +0 -54
  102. data/spec/models/point_spec.rb +0 -48
  103. data/spec/models/receipt_line_item_spec.rb +0 -48
  104. data/spec/models/receipt_recognition_result_spec.rb +0 -90
  105. data/spec/models/table_cell_result_spec.rb +0 -48
  106. data/spec/models/table_result_spec.rb +0 -48
  107. data/spec/models/table_row_result_spec.rb +0 -42
  108. data/spec/spec_helper.rb +0 -111
@@ -1,11 +0,0 @@
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
-
@@ -1,9 +0,0 @@
1
- # CloudmersiveOcrApiClient::GetPageAngleResult
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
- **angle** | **Float** | Angle of the page in radians; 0 represents perfectly horizontal | [optional]
8
-
9
-
@@ -1,565 +0,0 @@
1
- # CloudmersiveOcrApiClient::ImageOcrApi
2
-
3
- All URIs are relative to *https://api.cloudmersive.com*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**image_ocr_image_lines_with_location**](ImageOcrApi.md#image_ocr_image_lines_with_location) | **POST** /ocr/image/to/lines-with-location | Convert a scanned image into words with location
8
- [**image_ocr_image_words_with_location**](ImageOcrApi.md#image_ocr_image_words_with_location) | **POST** /ocr/image/to/words-with-location | Convert a scanned image into words with location
9
- [**image_ocr_photo_recognize_business_card**](ImageOcrApi.md#image_ocr_photo_recognize_business_card) | **POST** /ocr/photo/recognize/business-card | Recognize a photo of a business card, extract key business information
10
- [**image_ocr_photo_recognize_form**](ImageOcrApi.md#image_ocr_photo_recognize_form) | **POST** /ocr/photo/recognize/form | Recognize a photo of a form, extract key fields and business information
11
- [**image_ocr_photo_recognize_form_advanced**](ImageOcrApi.md#image_ocr_photo_recognize_form_advanced) | **POST** /ocr/photo/recognize/form/advanced | Recognize a photo of a form, extract key fields using stored templates
12
- [**image_ocr_photo_recognize_receipt**](ImageOcrApi.md#image_ocr_photo_recognize_receipt) | **POST** /ocr/photo/recognize/receipt | Recognize a photo of a receipt, extract key business information
13
- [**image_ocr_photo_to_text**](ImageOcrApi.md#image_ocr_photo_to_text) | **POST** /ocr/photo/toText | Convert a photo of a document into text
14
- [**image_ocr_photo_words_with_location**](ImageOcrApi.md#image_ocr_photo_words_with_location) | **POST** /ocr/photo/to/words-with-location | Convert a photo of a document or receipt into words with location
15
- [**image_ocr_post**](ImageOcrApi.md#image_ocr_post) | **POST** /ocr/image/toText | Convert a scanned image into text
16
-
17
-
18
- # **image_ocr_image_lines_with_location**
19
- > ImageToLinesWithLocationResult image_ocr_image_lines_with_location(image_file, opts)
20
-
21
- Convert a scanned image into words with location
22
-
23
- Converts an uploaded image in common formats such as JPEG, PNG into lines/text with location information and other metdata via Optical Character Recognition. This API is intended to be run on scanned documents. If you want to OCR photos (e.g. taken with a smart phone camera), be sure to use the photo/toText API instead, as it is designed to unskew the image first.
24
-
25
- ### Example
26
- ```ruby
27
- # load the gem
28
- require 'cloudmersive-ocr-api-client'
29
- # setup authorization
30
- CloudmersiveOcrApiClient.configure do |config|
31
- # Configure API key authorization: Apikey
32
- config.api_key['Apikey'] = 'YOUR API KEY'
33
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
- #config.api_key_prefix['Apikey'] = 'Bearer'
35
- end
36
-
37
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
38
-
39
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
40
-
41
- opts = {
42
- 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)
43
- 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 before OCR is applied; this is recommended).
44
- }
45
-
46
- begin
47
- #Convert a scanned image into words with location
48
- result = api_instance.image_ocr_image_lines_with_location(image_file, opts)
49
- p result
50
- rescue CloudmersiveOcrApiClient::ApiError => e
51
- puts "Exception when calling ImageOcrApi->image_ocr_image_lines_with_location: #{e}"
52
- end
53
- ```
54
-
55
- ### Parameters
56
-
57
- Name | Type | Description | Notes
58
- ------------- | ------------- | ------------- | -------------
59
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
60
- **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]
61
- **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 before OCR is applied; this is recommended). | [optional]
62
-
63
- ### Return type
64
-
65
- [**ImageToLinesWithLocationResult**](ImageToLinesWithLocationResult.md)
66
-
67
- ### Authorization
68
-
69
- [Apikey](../README.md#Apikey)
70
-
71
- ### HTTP request headers
72
-
73
- - **Content-Type**: multipart/form-data
74
- - **Accept**: application/json, text/json, application/xml, text/xml
75
-
76
-
77
-
78
- # **image_ocr_image_words_with_location**
79
- > ImageToWordsWithLocationResult image_ocr_image_words_with_location(image_file, opts)
80
-
81
- Convert a scanned image into words with location
82
-
83
- Converts an uploaded image in common formats such as JPEG, PNG into words/text with location information and other metdata via Optical Character Recognition. This API is intended to be run on scanned documents. If you want to OCR photos (e.g. taken with a smart phone camera), be sure to use the photo/toText API instead, as it is designed to unskew the image first.
84
-
85
- ### Example
86
- ```ruby
87
- # load the gem
88
- require 'cloudmersive-ocr-api-client'
89
- # setup authorization
90
- CloudmersiveOcrApiClient.configure do |config|
91
- # Configure API key authorization: Apikey
92
- config.api_key['Apikey'] = 'YOUR API KEY'
93
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
94
- #config.api_key_prefix['Apikey'] = 'Bearer'
95
- end
96
-
97
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
98
-
99
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
100
-
101
- opts = {
102
- 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)
103
- 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 before OCR is applied; this is recommended).
104
- }
105
-
106
- begin
107
- #Convert a scanned image into words with location
108
- result = api_instance.image_ocr_image_words_with_location(image_file, opts)
109
- p result
110
- rescue CloudmersiveOcrApiClient::ApiError => e
111
- puts "Exception when calling ImageOcrApi->image_ocr_image_words_with_location: #{e}"
112
- end
113
- ```
114
-
115
- ### Parameters
116
-
117
- Name | Type | Description | Notes
118
- ------------- | ------------- | ------------- | -------------
119
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
120
- **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]
121
- **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 before OCR is applied; this is recommended). | [optional]
122
-
123
- ### Return type
124
-
125
- [**ImageToWordsWithLocationResult**](ImageToWordsWithLocationResult.md)
126
-
127
- ### Authorization
128
-
129
- [Apikey](../README.md#Apikey)
130
-
131
- ### HTTP request headers
132
-
133
- - **Content-Type**: multipart/form-data
134
- - **Accept**: application/json, text/json, application/xml, text/xml
135
-
136
-
137
-
138
- # **image_ocr_photo_recognize_business_card**
139
- > BusinessCardRecognitionResult image_ocr_photo_recognize_business_card(image_file)
140
-
141
- Recognize a photo of a business card, extract key business information
142
-
143
- Analyzes a photograph of a business card as input, and outputs key business information such as the name of the person, name of the business, the address of the business, the phone number, the email address and more.
144
-
145
- ### Example
146
- ```ruby
147
- # load the gem
148
- require 'cloudmersive-ocr-api-client'
149
- # setup authorization
150
- CloudmersiveOcrApiClient.configure do |config|
151
- # Configure API key authorization: Apikey
152
- config.api_key['Apikey'] = 'YOUR API KEY'
153
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
154
- #config.api_key_prefix['Apikey'] = 'Bearer'
155
- end
156
-
157
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
158
-
159
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
160
-
161
-
162
- begin
163
- #Recognize a photo of a business card, extract key business information
164
- result = api_instance.image_ocr_photo_recognize_business_card(image_file)
165
- p result
166
- rescue CloudmersiveOcrApiClient::ApiError => e
167
- puts "Exception when calling ImageOcrApi->image_ocr_photo_recognize_business_card: #{e}"
168
- end
169
- ```
170
-
171
- ### Parameters
172
-
173
- Name | Type | Description | Notes
174
- ------------- | ------------- | ------------- | -------------
175
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
176
-
177
- ### Return type
178
-
179
- [**BusinessCardRecognitionResult**](BusinessCardRecognitionResult.md)
180
-
181
- ### Authorization
182
-
183
- [Apikey](../README.md#Apikey)
184
-
185
- ### HTTP request headers
186
-
187
- - **Content-Type**: multipart/form-data
188
- - **Accept**: application/json, text/json, application/xml, text/xml
189
-
190
-
191
-
192
- # **image_ocr_photo_recognize_form**
193
- > FormRecognitionResult image_ocr_photo_recognize_form(image_file, opts)
194
-
195
- Recognize a photo of a form, extract key fields and business information
196
-
197
- Analyzes a photograph of a form as input, and outputs key business fields and information. Customzie data to be extracted by defining fields for the form.
198
-
199
- ### Example
200
- ```ruby
201
- # load the gem
202
- require 'cloudmersive-ocr-api-client'
203
- # setup authorization
204
- CloudmersiveOcrApiClient.configure do |config|
205
- # Configure API key authorization: Apikey
206
- config.api_key['Apikey'] = 'YOUR API KEY'
207
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
208
- #config.api_key_prefix['Apikey'] = 'Bearer'
209
- end
210
-
211
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
212
-
213
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
214
-
215
- opts = {
216
- form_template_definition: "form_template_definition_example", # String | Form field definitions
217
- recognition_mode: "recognition_mode_example", # String | Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
218
- 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.
219
- diagnostics: "diagnostics_example", # String | Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance).
220
- 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)
221
- }
222
-
223
- begin
224
- #Recognize a photo of a form, extract key fields and business information
225
- result = api_instance.image_ocr_photo_recognize_form(image_file, opts)
226
- p result
227
- rescue CloudmersiveOcrApiClient::ApiError => e
228
- puts "Exception when calling ImageOcrApi->image_ocr_photo_recognize_form: #{e}"
229
- end
230
- ```
231
-
232
- ### Parameters
233
-
234
- Name | Type | Description | Notes
235
- ------------- | ------------- | ------------- | -------------
236
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
237
- **form_template_definition** | **String**| Form field definitions | [optional]
238
- **recognition_mode** | **String**| Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled. | [optional]
239
- **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]
240
- **diagnostics** | **String**| Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance). | [optional]
241
- **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]
242
-
243
- ### Return type
244
-
245
- [**FormRecognitionResult**](FormRecognitionResult.md)
246
-
247
- ### Authorization
248
-
249
- [Apikey](../README.md#Apikey)
250
-
251
- ### HTTP request headers
252
-
253
- - **Content-Type**: multipart/form-data
254
- - **Accept**: application/json, text/json, application/xml, text/xml
255
-
256
-
257
-
258
- # **image_ocr_photo_recognize_form_advanced**
259
- > FormRecognitionResult image_ocr_photo_recognize_form_advanced(image_file, opts)
260
-
261
- Recognize a photo of a form, extract key fields using stored templates
262
-
263
- Analyzes a photograph of a form as input, and outputs key business fields and information. Customzie data to be extracted by defining fields for the form. Uses template definitions stored in Cloudmersive Configuration; to configure stored templates in a configuration bucket, log into Cloudmersive Management Portal and navigate to Settings > API Configuration > Create Bucket
264
-
265
- ### Example
266
- ```ruby
267
- # load the gem
268
- require 'cloudmersive-ocr-api-client'
269
- # setup authorization
270
- CloudmersiveOcrApiClient.configure do |config|
271
- # Configure API key authorization: Apikey
272
- config.api_key['Apikey'] = 'YOUR API KEY'
273
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
274
- #config.api_key_prefix['Apikey'] = 'Bearer'
275
- end
276
-
277
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
278
-
279
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
280
-
281
- opts = {
282
- bucket_id: "bucket_id_example", # String | Bucket ID of the Configuration Bucket storing the form templates
283
- bucket_secret_key: "bucket_secret_key_example", # String | Bucket Secret Key of the Configuration Bucket storing the form templates
284
- recognition_mode: "recognition_mode_example", # String | Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
285
- 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.
286
- diagnostics: "diagnostics_example" # String | Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance).
287
- }
288
-
289
- begin
290
- #Recognize a photo of a form, extract key fields using stored templates
291
- result = api_instance.image_ocr_photo_recognize_form_advanced(image_file, opts)
292
- p result
293
- rescue CloudmersiveOcrApiClient::ApiError => e
294
- puts "Exception when calling ImageOcrApi->image_ocr_photo_recognize_form_advanced: #{e}"
295
- end
296
- ```
297
-
298
- ### Parameters
299
-
300
- Name | Type | Description | Notes
301
- ------------- | ------------- | ------------- | -------------
302
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
303
- **bucket_id** | **String**| Bucket ID of the Configuration Bucket storing the form templates | [optional]
304
- **bucket_secret_key** | **String**| Bucket Secret Key of the Configuration Bucket storing the form templates | [optional]
305
- **recognition_mode** | **String**| Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled. | [optional]
306
- **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]
307
- **diagnostics** | **String**| Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance). | [optional]
308
-
309
- ### Return type
310
-
311
- [**FormRecognitionResult**](FormRecognitionResult.md)
312
-
313
- ### Authorization
314
-
315
- [Apikey](../README.md#Apikey)
316
-
317
- ### HTTP request headers
318
-
319
- - **Content-Type**: multipart/form-data
320
- - **Accept**: application/json, text/json, application/xml, text/xml
321
-
322
-
323
-
324
- # **image_ocr_photo_recognize_receipt**
325
- > ReceiptRecognitionResult image_ocr_photo_recognize_receipt(image_file, opts)
326
-
327
- Recognize a photo of a receipt, extract key business information
328
-
329
- Analyzes a photograph of a receipt as input, and outputs key business information such as the name of the business, the address of the business, the phone number of the business, the total of the receipt, the date of the receipt, and more.
330
-
331
- ### Example
332
- ```ruby
333
- # load the gem
334
- require 'cloudmersive-ocr-api-client'
335
- # setup authorization
336
- CloudmersiveOcrApiClient.configure do |config|
337
- # Configure API key authorization: Apikey
338
- config.api_key['Apikey'] = 'YOUR API KEY'
339
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
340
- #config.api_key_prefix['Apikey'] = 'Bearer'
341
- end
342
-
343
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
344
-
345
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
346
-
347
- opts = {
348
- recognition_mode: "recognition_mode_example", # String | Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled.
349
- 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)
350
- 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).
351
- }
352
-
353
- begin
354
- #Recognize a photo of a receipt, extract key business information
355
- result = api_instance.image_ocr_photo_recognize_receipt(image_file, opts)
356
- p result
357
- rescue CloudmersiveOcrApiClient::ApiError => e
358
- puts "Exception when calling ImageOcrApi->image_ocr_photo_recognize_receipt: #{e}"
359
- end
360
- ```
361
-
362
- ### Parameters
363
-
364
- Name | Type | Description | Notes
365
- ------------- | ------------- | ------------- | -------------
366
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
367
- **recognition_mode** | **String**| Optional, enable advanced recognition mode by specifying 'Advanced', enable handwriting recognition by specifying 'EnableHandwriting'. Default is disabled. | [optional]
368
- **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]
369
- **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]
370
-
371
- ### Return type
372
-
373
- [**ReceiptRecognitionResult**](ReceiptRecognitionResult.md)
374
-
375
- ### Authorization
376
-
377
- [Apikey](../README.md#Apikey)
378
-
379
- ### HTTP request headers
380
-
381
- - **Content-Type**: multipart/form-data
382
- - **Accept**: application/json, text/json, application/xml, text/xml
383
-
384
-
385
-
386
- # **image_ocr_photo_to_text**
387
- > ImageToTextResponse image_ocr_photo_to_text(image_file, opts)
388
-
389
- Convert a photo of a document into text
390
-
391
- Converts an uploaded photo of a document in common formats such as JPEG, PNG into text via Optical Character Recognition. This API is intended to be run on photos of documents, e.g. taken with a smartphone and supports cases where other content, such as a desk, are in the frame and the camera is crooked. If you want to OCR a scanned image, use the image/toText API call instead as it is designed for scanned images.
392
-
393
- ### Example
394
- ```ruby
395
- # load the gem
396
- require 'cloudmersive-ocr-api-client'
397
- # setup authorization
398
- CloudmersiveOcrApiClient.configure do |config|
399
- # Configure API key authorization: Apikey
400
- config.api_key['Apikey'] = 'YOUR API KEY'
401
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
402
- #config.api_key_prefix['Apikey'] = 'Bearer'
403
- end
404
-
405
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
406
-
407
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
408
-
409
- opts = {
410
- 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)
411
- }
412
-
413
- begin
414
- #Convert a photo of a document into text
415
- result = api_instance.image_ocr_photo_to_text(image_file, opts)
416
- p result
417
- rescue CloudmersiveOcrApiClient::ApiError => e
418
- puts "Exception when calling ImageOcrApi->image_ocr_photo_to_text: #{e}"
419
- end
420
- ```
421
-
422
- ### Parameters
423
-
424
- Name | Type | Description | Notes
425
- ------------- | ------------- | ------------- | -------------
426
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
427
- **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]
428
-
429
- ### Return type
430
-
431
- [**ImageToTextResponse**](ImageToTextResponse.md)
432
-
433
- ### Authorization
434
-
435
- [Apikey](../README.md#Apikey)
436
-
437
- ### HTTP request headers
438
-
439
- - **Content-Type**: multipart/form-data
440
- - **Accept**: application/json, text/json, application/xml, text/xml
441
-
442
-
443
-
444
- # **image_ocr_photo_words_with_location**
445
- > PhotoToWordsWithLocationResult image_ocr_photo_words_with_location(image_file, opts)
446
-
447
- Convert a photo of a document or receipt into words with location
448
-
449
- Converts a photo of a document or receipt in common formats such as JPEG, PNG into words/text with location information and other metdata via Optical Character Recognition. This API is intended to be run on photographs of documents. If you want to OCR scanned documents (e.g. taken with a scanner), be sure to use the image/toText API instead, as it is designed for that use case.
450
-
451
- ### Example
452
- ```ruby
453
- # load the gem
454
- require 'cloudmersive-ocr-api-client'
455
- # setup authorization
456
- CloudmersiveOcrApiClient.configure do |config|
457
- # Configure API key authorization: Apikey
458
- config.api_key['Apikey'] = 'YOUR API KEY'
459
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
460
- #config.api_key_prefix['Apikey'] = 'Bearer'
461
- end
462
-
463
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
464
-
465
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
466
-
467
- opts = {
468
- 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)
469
- 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 before OCR is applied; this is recommended).
470
- diagnostics: "diagnostics_example" # String | Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance).
471
- }
472
-
473
- begin
474
- #Convert a photo of a document or receipt into words with location
475
- result = api_instance.image_ocr_photo_words_with_location(image_file, opts)
476
- p result
477
- rescue CloudmersiveOcrApiClient::ApiError => e
478
- puts "Exception when calling ImageOcrApi->image_ocr_photo_words_with_location: #{e}"
479
- end
480
- ```
481
-
482
- ### Parameters
483
-
484
- Name | Type | Description | Notes
485
- ------------- | ------------- | ------------- | -------------
486
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
487
- **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]
488
- **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 before OCR is applied; this is recommended). | [optional]
489
- **diagnostics** | **String**| Optional, diagnostics mode, default is 'false'. Possible values are 'true' (will set DiagnosticImage to a diagnostic PNG image in the result), and 'false' (no diagnostics are enabled; this is recommended for best performance). | [optional]
490
-
491
- ### Return type
492
-
493
- [**PhotoToWordsWithLocationResult**](PhotoToWordsWithLocationResult.md)
494
-
495
- ### Authorization
496
-
497
- [Apikey](../README.md#Apikey)
498
-
499
- ### HTTP request headers
500
-
501
- - **Content-Type**: multipart/form-data
502
- - **Accept**: application/json, text/json, application/xml, text/xml
503
-
504
-
505
-
506
- # **image_ocr_post**
507
- > ImageToTextResponse image_ocr_post(image_file, opts)
508
-
509
- Convert a scanned image into text
510
-
511
- Converts an uploaded image in common formats such as JPEG, PNG into text via Optical Character Recognition. This API is intended to be run on scanned documents. If you want to OCR photos (e.g. taken with a smart phone camera), be sure to use the photo/toText API instead, as it is designed to unskew the image first.
512
-
513
- ### Example
514
- ```ruby
515
- # load the gem
516
- require 'cloudmersive-ocr-api-client'
517
- # setup authorization
518
- CloudmersiveOcrApiClient.configure do |config|
519
- # Configure API key authorization: Apikey
520
- config.api_key['Apikey'] = 'YOUR API KEY'
521
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
522
- #config.api_key_prefix['Apikey'] = 'Bearer'
523
- end
524
-
525
- api_instance = CloudmersiveOcrApiClient::ImageOcrApi.new
526
-
527
- image_file = File.new("/path/to/file.txt") # File | Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
528
-
529
- opts = {
530
- 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)
531
- 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 before OCR is applied; this is recommended).
532
- }
533
-
534
- begin
535
- #Convert a scanned image into text
536
- result = api_instance.image_ocr_post(image_file, opts)
537
- p result
538
- rescue CloudmersiveOcrApiClient::ApiError => e
539
- puts "Exception when calling ImageOcrApi->image_ocr_post: #{e}"
540
- end
541
- ```
542
-
543
- ### Parameters
544
-
545
- Name | Type | Description | Notes
546
- ------------- | ------------- | ------------- | -------------
547
- **image_file** | **File**| Image file to perform OCR on. Common file formats such as PNG, JPEG are supported. |
548
- **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]
549
- **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 before OCR is applied; this is recommended). | [optional]
550
-
551
- ### Return type
552
-
553
- [**ImageToTextResponse**](ImageToTextResponse.md)
554
-
555
- ### Authorization
556
-
557
- [Apikey](../README.md#Apikey)
558
-
559
- ### HTTP request headers
560
-
561
- - **Content-Type**: multipart/form-data
562
- - **Accept**: application/json, text/json, application/xml, text/xml
563
-
564
-
565
-