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,
sig/mindee/v2/product/extraction/extraction_inference.rbs
Overview
Extraction inference.
Class Attribute Summary collapse
-
.params_type ⇒ singleton(Params::ExtractionParameters)
readonly
Returns the value of attribute params_type.
-
.response_type ⇒ singleton(ExtractionResponse)
readonly
Returns the value of attribute response_type.
-
.slug ⇒ String
readonly
Returns the value of attribute slug.
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.
Methods inherited from BaseProduct
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 = V2::Parsing::InferenceActiveOptions.new(server_response['active_options']) @result = ExtractionResult.new(server_response['result']) end |
Class Attribute Details
.params_type ⇒ singleton(Params::ExtractionParameters) (readonly)
Returns the value of attribute params_type.
6 7 8 |
# File 'sig/mindee/v2/product/extraction/extraction_inference.rbs', line 6 def params_type @params_type end |
.response_type ⇒ singleton(ExtractionResponse) (readonly)
Returns the value of attribute response_type.
7 8 9 |
# File 'sig/mindee/v2/product/extraction/extraction_inference.rbs', line 7 def response_type @response_type end |
.slug ⇒ String (readonly)
Returns the value of attribute slug.
8 9 10 |
# File 'sig/mindee/v2/product/extraction/extraction_inference.rbs', line 8 def slug @slug 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 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, .to_s, @result.to_s, '', ].join("\n") end |