class Mindee::Parsing::Common::OCR::OCRWord

def initialize(prediction)

Parameters:
  • prediction (Hash) --
def initialize(prediction)
  @text = prediction['text']
  @confidence = prediction['confidence']
  @polygon = Geometry.polygon_from_prediction(prediction['polygon'])
  @bounding_box = Geometry.get_bounding_box(@polygon) unless @polygon.nil? || @polygon.empty?
end