Class: Mindee::V1::Parsing::Standard::StringField

Inherits:
BaseField show all
Defined in:
lib/mindee/v1/parsing/standard/string_field.rb

Overview

Represents basic text information.

Direct Known Subclasses

AddressField

Instance Attribute Summary collapse

Attributes inherited from BaseField

#reconstructed

Attributes inherited from AbstractField

#bounding_box, #confidence, #page_id, #polygon

Instance Method Summary collapse

Methods inherited from AbstractField

array_confidence, array_sum, float_to_string, #to_s

Constructor Details

#initialize(prediction, page_id = nil, reconstructed: false) ⇒ StringField

Returns a new instance of StringField.



18
19
20
21
# File 'lib/mindee/v1/parsing/standard/string_field.rb', line 18

def initialize(prediction, page_id = nil, reconstructed: false)
  super
  @raw_value = prediction['raw_value']
end

Instance Attribute Details

#raw_valueString? (readonly)

Value as String

Returns:

  • (String, nil)


16
17
18
# File 'lib/mindee/v1/parsing/standard/string_field.rb', line 16

def raw_value
  @raw_value
end

#valueString? (readonly)

Value as String

Returns:

  • (String, nil)


13
14
15
# File 'lib/mindee/v1/parsing/standard/string_field.rb', line 13

def value
  @value
end