Class: Mindee::Product::Custom::CustomV1

Inherits:
Mindee::Parsing::Common::Inference show all
Defined in:
lib/mindee/product/custom/custom_v1.rb

Overview

Custom Document V1 prediction inference.

Class Attribute Summary collapse

Attributes inherited from Mindee::Parsing::Common::Inference

#is_rotation_applied, #pages, #prediction, #product

Instance Method Summary collapse

Methods inherited from Mindee::Parsing::Common::Inference

#to_s

Constructor Details

#initialize(prediction) ⇒ CustomV1

Returns a new instance of CustomV1.

Parameters:

  • prediction (Hash)


16
17
18
19
20
21
22
23
# File 'lib/mindee/product/custom/custom_v1.rb', line 16

def initialize(prediction)
  super
  @prediction = CustomV1Document.new(prediction['prediction'], nil)
  @pages = []
  prediction['pages'].each do |page|
    @pages.push(CustomV1Page.new(page))
  end
end

Class Attribute Details

.endpoint_nameString (readonly)

Name of the endpoint for this product.

Returns:

  • (String)


28
29
30
# File 'lib/mindee/product/custom/custom_v1.rb', line 28

def endpoint_name
  @endpoint_name
end

.endpoint_versionString (readonly)

Version for this product.

Returns:

  • (String)


31
32
33
# File 'lib/mindee/product/custom/custom_v1.rb', line 31

def endpoint_version
  @endpoint_version
end