Class: Mindee::V2::Product::Extraction::ExtractionInference
- Inherits:
-
Mindee::V2::Parsing::BaseInference
- Object
- BaseProduct
- Mindee::V2::Parsing::BaseInference
- Mindee::V2::Product::Extraction::ExtractionInference
- Defined in:
- lib/mindee/v2/product/extraction/extraction_inference.rb
Overview
Extraction inference.
Instance Attribute Summary collapse
-
#active_options ⇒ InferenceActiveOptions
readonly
Options which were activated during the inference.
-
#result ⇒ ExtractionResult
readonly
Result contents.
Attributes inherited from Mindee::V2::Parsing::BaseInference
Instance Method Summary collapse
-
#initialize(server_response) ⇒ ExtractionInference
constructor
A new instance of ExtractionInference.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ ExtractionInference
Returns a new instance of ExtractionInference.
19 20 21 22 23 24 |
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 19 def initialize(server_response) super @active_options = V2::Parsing::InferenceActiveOptions.new(server_response['active_options']) @result = ExtractionResult.new(server_response['result']) end |
Instance Attribute Details
#active_options ⇒ InferenceActiveOptions (readonly)
Returns Options which were activated during the inference.
14 15 16 |
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 14 def @active_options end |
#result ⇒ ExtractionResult (readonly)
Returns Result contents.
16 17 18 |
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 16 def result @result end |
Instance Method Details
#to_s ⇒ String
String representation.
28 29 30 31 32 33 34 35 |
# File 'lib/mindee/v2/product/extraction/extraction_inference.rb', line 28 def to_s [ super, @active_options.to_s, @result.to_s, '', ].join("\n") end |