cloudmersive-ocr-api-client 1.4.7 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +7 -7
  4. data/cloudmersive-ocr-api-client.gemspec +3 -3
  5. data/docs/FormFieldDefinition.md +1 -0
  6. data/docs/ImageOcrApi.md +39 -33
  7. data/docs/PdfOcrApi.md +11 -9
  8. data/docs/PreprocessingApi.md +6 -6
  9. data/docs/ReceiptsApi.md +1 -1
  10. data/lib/cloudmersive-ocr-api-client.rb +1 -1
  11. data/lib/cloudmersive-ocr-api-client/api/image_ocr_api.rb +49 -49
  12. data/lib/cloudmersive-ocr-api-client/api/pdf_ocr_api.rb +17 -19
  13. data/lib/cloudmersive-ocr-api-client/api/preprocessing_api.rb +26 -32
  14. data/lib/cloudmersive-ocr-api-client/api/receipts_api.rb +6 -7
  15. data/lib/cloudmersive-ocr-api-client/api_client.rb +11 -9
  16. data/lib/cloudmersive-ocr-api-client/api_error.rb +1 -1
  17. data/lib/cloudmersive-ocr-api-client/configuration.rb +2 -2
  18. data/lib/cloudmersive-ocr-api-client/models/business_card_recognition_result.rb +7 -10
  19. data/lib/cloudmersive-ocr-api-client/models/field_result.rb +7 -10
  20. data/lib/cloudmersive-ocr-api-client/models/form_definition_template.rb +7 -10
  21. data/lib/cloudmersive-ocr-api-client/models/form_field_definition.rb +18 -11
  22. data/lib/cloudmersive-ocr-api-client/models/form_recognition_result.rb +7 -10
  23. data/lib/cloudmersive-ocr-api-client/models/form_table_column_definition.rb +7 -10
  24. data/lib/cloudmersive-ocr-api-client/models/form_table_definition.rb +7 -10
  25. data/lib/cloudmersive-ocr-api-client/models/get_page_angle_result.rb +7 -10
  26. data/lib/cloudmersive-ocr-api-client/models/image_to_lines_with_location_result.rb +7 -10
  27. data/lib/cloudmersive-ocr-api-client/models/image_to_text_response.rb +7 -10
  28. data/lib/cloudmersive-ocr-api-client/models/image_to_words_with_location_result.rb +7 -10
  29. data/lib/cloudmersive-ocr-api-client/models/ocr_line_element.rb +7 -10
  30. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result.rb +7 -11
  31. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_lines_with_location.rb +7 -10
  32. data/lib/cloudmersive-ocr-api-client/models/ocr_page_result_with_words_with_location.rb +7 -10
  33. data/lib/cloudmersive-ocr-api-client/models/ocr_photo_text_element.rb +7 -10
  34. data/lib/cloudmersive-ocr-api-client/models/ocr_word_element.rb +7 -10
  35. data/lib/cloudmersive-ocr-api-client/models/pdf_to_lines_with_location_result.rb +7 -10
  36. data/lib/cloudmersive-ocr-api-client/models/pdf_to_text_response.rb +7 -10
  37. data/lib/cloudmersive-ocr-api-client/models/pdf_to_words_with_location_result.rb +7 -10
  38. data/lib/cloudmersive-ocr-api-client/models/photo_to_words_with_location_result.rb +9 -13
  39. data/lib/cloudmersive-ocr-api-client/models/point.rb +7 -10
  40. data/lib/cloudmersive-ocr-api-client/models/receipt_line_item.rb +7 -10
  41. data/lib/cloudmersive-ocr-api-client/models/receipt_recognition_result.rb +7 -10
  42. data/lib/cloudmersive-ocr-api-client/models/table_cell_result.rb +7 -10
  43. data/lib/cloudmersive-ocr-api-client/models/table_result.rb +7 -10
  44. data/lib/cloudmersive-ocr-api-client/models/table_row_result.rb +7 -10
  45. data/lib/cloudmersive-ocr-api-client/version.rb +2 -2
  46. data/spec/api/image_ocr_api_spec.rb +14 -11
  47. data/spec/api/pdf_ocr_api_spec.rb +5 -5
  48. data/spec/api/preprocessing_api_spec.rb +7 -7
  49. data/spec/api/receipts_api_spec.rb +2 -2
  50. data/spec/api_client_spec.rb +52 -35
  51. data/spec/configuration_spec.rb +9 -9
  52. data/spec/models/business_card_recognition_result_spec.rb +9 -10
  53. data/spec/models/field_result_spec.rb +3 -4
  54. data/spec/models/form_definition_template_spec.rb +3 -4
  55. data/spec/models/form_field_definition_spec.rb +24 -19
  56. data/spec/models/form_recognition_result_spec.rb +6 -7
  57. data/spec/models/form_table_column_definition_spec.rb +7 -8
  58. data/spec/models/form_table_definition_spec.rb +5 -6
  59. data/spec/models/get_page_angle_result_spec.rb +3 -4
  60. data/spec/models/image_to_lines_with_location_result_spec.rb +3 -4
  61. data/spec/models/image_to_text_response_spec.rb +3 -4
  62. data/spec/models/image_to_words_with_location_result_spec.rb +3 -4
  63. data/spec/models/ocr_line_element_spec.rb +3 -4
  64. data/spec/models/ocr_page_result_spec.rb +4 -5
  65. data/spec/models/ocr_page_result_with_lines_with_location_spec.rb +4 -5
  66. data/spec/models/ocr_page_result_with_words_with_location_spec.rb +4 -5
  67. data/spec/models/ocr_photo_text_element_spec.rb +8 -9
  68. data/spec/models/ocr_word_element_spec.rb +12 -13
  69. data/spec/models/pdf_to_lines_with_location_result_spec.rb +3 -4
  70. data/spec/models/pdf_to_text_response_spec.rb +3 -4
  71. data/spec/models/pdf_to_words_with_location_result_spec.rb +3 -4
  72. data/spec/models/photo_to_words_with_location_result_spec.rb +4 -5
  73. data/spec/models/point_spec.rb +3 -4
  74. data/spec/models/receipt_line_item_spec.rb +3 -4
  75. data/spec/models/receipt_recognition_result_spec.rb +10 -11
  76. data/spec/models/table_cell_result_spec.rb +3 -4
  77. data/spec/models/table_result_spec.rb +3 -4
  78. data/spec/models/table_row_result_spec.rb +2 -3
  79. data/spec/spec_helper.rb +1 -1
  80. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -42,7 +42,6 @@ module CloudmersiveOcrApiClient
42
42
  # The total monetary value of the receipt (if included on the receipt)
43
43
  attr_accessor :receipt_total
44
44
 
45
-
46
45
  # Attribute mapping from ruby-style variable name to JSON key.
47
46
  def self.attribute_map
48
47
  {
@@ -79,7 +78,7 @@ module CloudmersiveOcrApiClient
79
78
  return unless attributes.is_a?(Hash)
80
79
 
81
80
  # convert string to symbol for hash key
82
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
81
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
83
82
 
84
83
  if attributes.has_key?(:'Successful')
85
84
  self.successful = attributes[:'Successful']
@@ -118,20 +117,19 @@ module CloudmersiveOcrApiClient
118
117
  if attributes.has_key?(:'ReceiptTotal')
119
118
  self.receipt_total = attributes[:'ReceiptTotal']
120
119
  end
121
-
122
120
  end
123
121
 
124
122
  # Show invalid properties with the reasons. Usually used together with valid?
125
123
  # @return Array for valid properties with the reasons
126
124
  def list_invalid_properties
127
125
  invalid_properties = Array.new
128
- return invalid_properties
126
+ invalid_properties
129
127
  end
130
128
 
131
129
  # Check to see if the all the properties in the model are valid
132
130
  # @return true if the model is valid
133
131
  def valid?
134
- return true
132
+ true
135
133
  end
136
134
 
137
135
  # Checks equality by comparing each attribute.
@@ -169,10 +167,10 @@ module CloudmersiveOcrApiClient
169
167
  return nil unless attributes.is_a?(Hash)
170
168
  self.class.swagger_types.each_pair do |key, type|
171
169
  if type =~ /\AArray<(.*)>/i
172
- # check to ensure the input is an array given that the the attribute
170
+ # check to ensure the input is an array given that the attribute
173
171
  # is documented as an array but the input is not
174
172
  if attributes[self.class.attribute_map[key]].is_a?(Array)
175
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
173
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
174
  end
177
175
  elsif !attributes[self.class.attribute_map[key]].nil?
178
176
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -254,7 +252,7 @@ module CloudmersiveOcrApiClient
254
252
  # @return [Hash] Returns the value in the form of hash
255
253
  def _to_hash(value)
256
254
  if value.is_a?(Array)
257
- value.compact.map{ |v| _to_hash(v) }
255
+ value.compact.map { |v| _to_hash(v) }
258
256
  elsif value.is_a?(Hash)
259
257
  {}.tap do |hash|
260
258
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -267,5 +265,4 @@ module CloudmersiveOcrApiClient
267
265
  end
268
266
 
269
267
  end
270
-
271
268
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Result cell value(s) extracted
22
22
  attr_accessor :cell_values
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'ColumnID')
50
49
  self.column_id = attributes[:'ColumnID']
@@ -55,20 +54,19 @@ module CloudmersiveOcrApiClient
55
54
  self.cell_values = value
56
55
  end
57
56
  end
58
-
59
57
  end
60
58
 
61
59
  # Show invalid properties with the reasons. Usually used together with valid?
62
60
  # @return Array for valid properties with the reasons
63
61
  def list_invalid_properties
64
62
  invalid_properties = Array.new
65
- return invalid_properties
63
+ invalid_properties
66
64
  end
67
65
 
68
66
  # Check to see if the all the properties in the model are valid
69
67
  # @return true if the model is valid
70
68
  def valid?
71
- return true
69
+ true
72
70
  end
73
71
 
74
72
  # Checks equality by comparing each attribute.
@@ -99,10 +97,10 @@ module CloudmersiveOcrApiClient
99
97
  return nil unless attributes.is_a?(Hash)
100
98
  self.class.swagger_types.each_pair do |key, type|
101
99
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
100
+ # check to ensure the input is an array given that the attribute
103
101
  # is documented as an array but the input is not
104
102
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
104
  end
107
105
  elsif !attributes[self.class.attribute_map[key]].nil?
108
106
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -184,7 +182,7 @@ module CloudmersiveOcrApiClient
184
182
  # @return [Hash] Returns the value in the form of hash
185
183
  def _to_hash(value)
186
184
  if value.is_a?(Array)
187
- value.compact.map{ |v| _to_hash(v) }
185
+ value.compact.map { |v| _to_hash(v) }
188
186
  elsif value.is_a?(Hash)
189
187
  {}.tap do |hash|
190
188
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -197,5 +195,4 @@ module CloudmersiveOcrApiClient
197
195
  end
198
196
 
199
197
  end
200
-
201
198
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -21,7 +21,6 @@ module CloudmersiveOcrApiClient
21
21
  # Rows of data in the table
22
22
  attr_accessor :table_rows_result
23
23
 
24
-
25
24
  # Attribute mapping from ruby-style variable name to JSON key.
26
25
  def self.attribute_map
27
26
  {
@@ -44,7 +43,7 @@ module CloudmersiveOcrApiClient
44
43
  return unless attributes.is_a?(Hash)
45
44
 
46
45
  # convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
47
 
49
48
  if attributes.has_key?(:'TableDefinition')
50
49
  self.table_definition = attributes[:'TableDefinition']
@@ -55,20 +54,19 @@ module CloudmersiveOcrApiClient
55
54
  self.table_rows_result = value
56
55
  end
57
56
  end
58
-
59
57
  end
60
58
 
61
59
  # Show invalid properties with the reasons. Usually used together with valid?
62
60
  # @return Array for valid properties with the reasons
63
61
  def list_invalid_properties
64
62
  invalid_properties = Array.new
65
- return invalid_properties
63
+ invalid_properties
66
64
  end
67
65
 
68
66
  # Check to see if the all the properties in the model are valid
69
67
  # @return true if the model is valid
70
68
  def valid?
71
- return true
69
+ true
72
70
  end
73
71
 
74
72
  # Checks equality by comparing each attribute.
@@ -99,10 +97,10 @@ module CloudmersiveOcrApiClient
99
97
  return nil unless attributes.is_a?(Hash)
100
98
  self.class.swagger_types.each_pair do |key, type|
101
99
  if type =~ /\AArray<(.*)>/i
102
- # check to ensure the input is an array given that the the attribute
100
+ # check to ensure the input is an array given that the attribute
103
101
  # is documented as an array but the input is not
104
102
  if attributes[self.class.attribute_map[key]].is_a?(Array)
105
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
104
  end
107
105
  elsif !attributes[self.class.attribute_map[key]].nil?
108
106
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -184,7 +182,7 @@ module CloudmersiveOcrApiClient
184
182
  # @return [Hash] Returns the value in the form of hash
185
183
  def _to_hash(value)
186
184
  if value.is_a?(Array)
187
- value.compact.map{ |v| _to_hash(v) }
185
+ value.compact.map { |v| _to_hash(v) }
188
186
  elsif value.is_a?(Hash)
189
187
  {}.tap do |hash|
190
188
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -197,5 +195,4 @@ module CloudmersiveOcrApiClient
197
195
  end
198
196
 
199
197
  end
200
-
201
198
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,6 @@ module CloudmersiveOcrApiClient
18
18
  # Table cells in this row result
19
19
  attr_accessor :table_row_cells_result
20
20
 
21
-
22
21
  # Attribute mapping from ruby-style variable name to JSON key.
23
22
  def self.attribute_map
24
23
  {
@@ -39,27 +38,26 @@ module CloudmersiveOcrApiClient
39
38
  return unless attributes.is_a?(Hash)
40
39
 
41
40
  # convert string to symbol for hash key
42
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
43
42
 
44
43
  if attributes.has_key?(:'TableRowCellsResult')
45
44
  if (value = attributes[:'TableRowCellsResult']).is_a?(Array)
46
45
  self.table_row_cells_result = value
47
46
  end
48
47
  end
49
-
50
48
  end
51
49
 
52
50
  # Show invalid properties with the reasons. Usually used together with valid?
53
51
  # @return Array for valid properties with the reasons
54
52
  def list_invalid_properties
55
53
  invalid_properties = Array.new
56
- return invalid_properties
54
+ invalid_properties
57
55
  end
58
56
 
59
57
  # Check to see if the all the properties in the model are valid
60
58
  # @return true if the model is valid
61
59
  def valid?
62
- return true
60
+ true
63
61
  end
64
62
 
65
63
  # Checks equality by comparing each attribute.
@@ -89,10 +87,10 @@ module CloudmersiveOcrApiClient
89
87
  return nil unless attributes.is_a?(Hash)
90
88
  self.class.swagger_types.each_pair do |key, type|
91
89
  if type =~ /\AArray<(.*)>/i
92
- # check to ensure the input is an array given that the the attribute
90
+ # check to ensure the input is an array given that the attribute
93
91
  # is documented as an array but the input is not
94
92
  if attributes[self.class.attribute_map[key]].is_a?(Array)
95
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
93
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
96
94
  end
97
95
  elsif !attributes[self.class.attribute_map[key]].nil?
98
96
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -174,7 +172,7 @@ module CloudmersiveOcrApiClient
174
172
  # @return [Hash] Returns the value in the form of hash
175
173
  def _to_hash(value)
176
174
  if value.is_a?(Array)
177
- value.compact.map{ |v| _to_hash(v) }
175
+ value.compact.map { |v| _to_hash(v) }
178
176
  elsif value.is_a?(Hash)
179
177
  {}.tap do |hash|
180
178
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -187,5 +185,4 @@ module CloudmersiveOcrApiClient
187
185
  end
188
186
 
189
187
  end
190
-
191
188
  end
@@ -6,10 +6,10 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
13
13
  module CloudmersiveOcrApiClient
14
- VERSION = "1.4.7"
14
+ VERSION = '2.0.2'
15
15
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -41,7 +41,7 @@ describe 'ImageOcrApi' do
41
41
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
42
42
  # @return [ImageToLinesWithLocationResult]
43
43
  describe 'image_ocr_image_lines_with_location test' do
44
- it "should work" do
44
+ it 'should work' do
45
45
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
46
  end
47
47
  end
@@ -55,7 +55,7 @@ describe 'ImageOcrApi' do
55
55
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
56
56
  # @return [ImageToWordsWithLocationResult]
57
57
  describe 'image_ocr_image_words_with_location test' do
58
- it "should work" do
58
+ it 'should work' do
59
59
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
60
  end
61
61
  end
@@ -67,7 +67,7 @@ describe 'ImageOcrApi' do
67
67
  # @param [Hash] opts the optional parameters
68
68
  # @return [BusinessCardRecognitionResult]
69
69
  describe 'image_ocr_photo_recognize_business_card test' do
70
- it "should work" do
70
+ it 'should work' do
71
71
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
72
  end
73
73
  end
@@ -77,14 +77,14 @@ describe 'ImageOcrApi' do
77
77
  # 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.
78
78
  # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
79
79
  # @param [Hash] opts the optional parameters
80
- # @option opts [String] :form_template_definition Form field definitions
80
+ # @option opts [Object] :form_template_definition Form field definitions
81
81
  # @option opts [String] :recognition_mode Optional, enable advanced recognition mode by specifying &#39;Advanced&#39;, enable handwriting recognition by specifying &#39;EnableHandwriting&#39;. Default is disabled.
82
82
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. 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 &#39;None&#39; if you do not want to use automatic image unrotation and enhancement.
83
83
  # @option opts [String] :diagnostics Optional, diagnostics mode, default is &#39;false&#39;. Possible values are &#39;true&#39; (will set DiagnosticImage to a diagnostic PNG image in the result), and &#39;false&#39; (no diagnostics are enabled; this is recommended for best performance).
84
84
  # @option opts [String] :language 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)
85
85
  # @return [FormRecognitionResult]
86
86
  describe 'image_ocr_photo_recognize_form test' do
87
- it "should work" do
87
+ it 'should work' do
88
88
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
89
89
  end
90
90
  end
@@ -101,7 +101,7 @@ describe 'ImageOcrApi' do
101
101
  # @option opts [String] :diagnostics Optional, diagnostics mode, default is &#39;false&#39;. Possible values are &#39;true&#39; (will set DiagnosticImage to a diagnostic PNG image in the result), and &#39;false&#39; (no diagnostics are enabled; this is recommended for best performance).
102
102
  # @return [FormRecognitionResult]
103
103
  describe 'image_ocr_photo_recognize_form_advanced test' do
104
- it "should work" do
104
+ it 'should work' do
105
105
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
106
106
  end
107
107
  end
@@ -116,7 +116,7 @@ describe 'ImageOcrApi' do
116
116
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;None&#39;. Possible values are None (no preprocessing of the image), and &#39;Advanced&#39; (automatic image enhancement of the image before OCR is applied; this is recommended and needed to handle rotated receipts).
117
117
  # @return [ReceiptRecognitionResult]
118
118
  describe 'image_ocr_photo_recognize_receipt test' do
119
- it "should work" do
119
+ it 'should work' do
120
120
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
121
121
  end
122
122
  end
@@ -126,10 +126,11 @@ describe 'ImageOcrApi' do
126
126
  # 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.
127
127
  # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
128
128
  # @param [Hash] opts the optional parameters
129
+ # @option opts [String] :recognition_mode Optional; possible values are &#39;Basic&#39; which provides basic recognition and is not resillient to page rotation, skew or low quality images uses 1-2 API calls; &#39;Normal&#39; which provides highly fault tolerant OCR recognition uses 26-30 API calls; and &#39;Advanced&#39; which provides the highest quality and most fault-tolerant recognition uses 28-30 API calls. Default recognition mode is &#39;Advanced&#39;
129
130
  # @option opts [String] :language 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)
130
131
  # @return [ImageToTextResponse]
131
132
  describe 'image_ocr_photo_to_text test' do
132
- it "should work" do
133
+ it 'should work' do
133
134
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
134
135
  end
135
136
  end
@@ -139,12 +140,13 @@ describe 'ImageOcrApi' do
139
140
  # 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.
140
141
  # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
141
142
  # @param [Hash] opts the optional parameters
143
+ # @option opts [String] :recognition_mode Optional; possible values are &#39;Normal&#39; which provides highly fault tolerant OCR recognition uses 26-30 API calls; and &#39;Advanced&#39; which provides the highest quality and most fault-tolerant recognition uses 28-30 API calls. Default recognition mode is &#39;Advanced&#39;
142
144
  # @option opts [String] :language 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)
143
145
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
144
146
  # @option opts [String] :diagnostics Optional, diagnostics mode, default is &#39;false&#39;. Possible values are &#39;true&#39; (will set DiagnosticImage to a diagnostic PNG image in the result), and &#39;false&#39; (no diagnostics are enabled; this is recommended for best performance).
145
147
  # @return [PhotoToWordsWithLocationResult]
146
148
  describe 'image_ocr_photo_words_with_location test' do
147
- it "should work" do
149
+ it 'should work' do
148
150
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
149
151
  end
150
152
  end
@@ -154,11 +156,12 @@ describe 'ImageOcrApi' do
154
156
  # 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.
155
157
  # @param image_file Image file to perform OCR on. Common file formats such as PNG, JPEG are supported.
156
158
  # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :recognition_mode Optional; possible values are &#39;Basic&#39; which provides basic recognition and is not resillient to page rotation, skew or low quality images uses 1-2 API calls; &#39;Normal&#39; which provides highly fault tolerant OCR recognition uses 26-30 API calls; and &#39;Advanced&#39; which provides the highest quality and most fault-tolerant recognition uses 28-30 API calls. Default recognition mode is &#39;Advanced&#39;
157
160
  # @option opts [String] :language 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)
158
161
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
159
162
  # @return [ImageToTextResponse]
160
163
  describe 'image_ocr_post test' do
161
- it "should work" do
164
+ it 'should work' do
162
165
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
163
166
  end
164
167
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: v1
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.14
10
10
 
11
11
  =end
12
12
 
@@ -41,7 +41,7 @@ describe 'PdfOcrApi' do
41
41
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
42
42
  # @return [PdfToLinesWithLocationResult]
43
43
  describe 'pdf_ocr_pdf_to_lines_with_location test' do
44
- it "should work" do
44
+ it 'should work' do
45
45
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
46
  end
47
47
  end
@@ -55,21 +55,21 @@ describe 'PdfOcrApi' do
55
55
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
56
56
  # @return [PdfToWordsWithLocationResult]
57
57
  describe 'pdf_ocr_pdf_to_words_with_location test' do
58
- it "should work" do
58
+ it 'should work' do
59
59
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
60
  end
61
61
  end
62
62
 
63
63
  # unit tests for pdf_ocr_post
64
64
  # Converts an uploaded PDF file into text via Optical Character Recognition.
65
- #
66
65
  # @param image_file PDF file to perform OCR on.
67
66
  # @param [Hash] opts the optional parameters
67
+ # @option opts [String] :recognition_mode Optional; possible values are &#39;Basic&#39; which provides basic recognition and is not resillient to page rotation, skew or low quality images uses 1-2 API calls per page; &#39;Normal&#39; which provides highly fault tolerant OCR recognition uses 26-30 API calls per page; and &#39;Advanced&#39; which provides the highest quality and most fault-tolerant recognition uses 28-30 API calls per page. Default recognition mode is &#39;Basic&#39;
68
68
  # @option opts [String] :language 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)
69
69
  # @option opts [String] :preprocessing Optional, preprocessing mode, default is &#39;Auto&#39;. Possible values are None (no preprocessing of the image), and Auto (automatic image enhancement of the image before OCR is applied; this is recommended).
70
70
  # @return [PdfToTextResponse]
71
71
  describe 'pdf_ocr_post test' do
72
- it "should work" do
72
+ it 'should work' do
73
73
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
74
  end
75
75
  end