mindee 3.15.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/docs/business_card_v1.md +169 -0
- data/docs/code_samples/business_card_v1_async.txt +19 -0
- data/docs/code_samples/delivery_notes_v1_async.txt +19 -0
- data/docs/code_samples/expense_receipts_v5_async.txt +19 -0
- data/docs/code_samples/ind_passport_v1_async.txt +19 -0
- data/docs/delivery_notes_v1.md +143 -0
- data/docs/energy_bill_fra_v1.md +2 -2
- data/docs/expense_receipts_v5.md +27 -2
- data/docs/financial_document_v1.md +8 -4
- data/docs/ind_passport_v1.md +281 -0
- data/docs/invoices_v4.md +12 -8
- data/docs/resume_v1.md +17 -16
- data/lib/mindee/client.rb +8 -8
- data/lib/mindee/product/business_card/business_card_v1.rb +39 -0
- data/lib/mindee/product/business_card/business_card_v1_document.rb +85 -0
- data/lib/mindee/product/business_card/business_card_v1_page.rb +32 -0
- data/lib/mindee/product/delivery_note/delivery_note_v1.rb +39 -0
- data/lib/mindee/product/delivery_note/delivery_note_v1_document.rb +61 -0
- data/lib/mindee/product/delivery_note/delivery_note_v1_page.rb +32 -0
- data/lib/mindee/product/financial_document/financial_document_v1_document.rb +1 -1
- data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
- data/lib/mindee/product/ind/indian_passport/indian_passport_v1.rb +41 -0
- data/lib/mindee/product/ind/indian_passport/indian_passport_v1_document.rb +143 -0
- data/lib/mindee/product/ind/indian_passport/indian_passport_v1_page.rb +34 -0
- data/lib/mindee/product/invoice/invoice_v4_document.rb +1 -1
- data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
- data/lib/mindee/product/resume/resume_v1_document.rb +3 -1
- data/lib/mindee/product/resume/resume_v1_page.rb +1 -1
- data/lib/mindee/product/resume/resume_v1_professional_experience.rb +8 -0
- data/lib/mindee/product.rb +10 -7
- data/lib/mindee/version.rb +1 -1
- metadata +18 -2
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../parsing'
|
4
|
+
|
5
|
+
module Mindee
|
6
|
+
module Product
|
7
|
+
module DeliveryNote
|
8
|
+
# Delivery note API version 1.1 document data.
|
9
|
+
class DeliveryNoteV1Document < Mindee::Parsing::Common::Prediction
|
10
|
+
include Mindee::Parsing::Standard
|
11
|
+
# The address of the customer receiving the goods.
|
12
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
13
|
+
attr_reader :customer_address
|
14
|
+
# The name of the customer receiving the goods.
|
15
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
16
|
+
attr_reader :customer_name
|
17
|
+
# The date on which the delivery is scheduled to arrive.
|
18
|
+
# @return [Mindee::Parsing::Standard::DateField]
|
19
|
+
attr_reader :delivery_date
|
20
|
+
# A unique identifier for the delivery note.
|
21
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
22
|
+
attr_reader :delivery_number
|
23
|
+
# The address of the supplier providing the goods.
|
24
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
25
|
+
attr_reader :supplier_address
|
26
|
+
# The name of the supplier providing the goods.
|
27
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
28
|
+
attr_reader :supplier_name
|
29
|
+
# The total monetary value of the goods being delivered.
|
30
|
+
# @return [Mindee::Parsing::Standard::AmountField]
|
31
|
+
attr_reader :total_amount
|
32
|
+
|
33
|
+
# @param prediction [Hash]
|
34
|
+
# @param page_id [Integer, nil]
|
35
|
+
def initialize(prediction, page_id)
|
36
|
+
super()
|
37
|
+
@customer_address = StringField.new(prediction['customer_address'], page_id)
|
38
|
+
@customer_name = StringField.new(prediction['customer_name'], page_id)
|
39
|
+
@delivery_date = DateField.new(prediction['delivery_date'], page_id)
|
40
|
+
@delivery_number = StringField.new(prediction['delivery_number'], page_id)
|
41
|
+
@supplier_address = StringField.new(prediction['supplier_address'], page_id)
|
42
|
+
@supplier_name = StringField.new(prediction['supplier_name'], page_id)
|
43
|
+
@total_amount = AmountField.new(prediction['total_amount'], page_id)
|
44
|
+
end
|
45
|
+
|
46
|
+
# @return [String]
|
47
|
+
def to_s
|
48
|
+
out_str = String.new
|
49
|
+
out_str << "\n:Delivery Date: #{@delivery_date}".rstrip
|
50
|
+
out_str << "\n:Delivery Number: #{@delivery_number}".rstrip
|
51
|
+
out_str << "\n:Supplier Name: #{@supplier_name}".rstrip
|
52
|
+
out_str << "\n:Supplier Address: #{@supplier_address}".rstrip
|
53
|
+
out_str << "\n:Customer Name: #{@customer_name}".rstrip
|
54
|
+
out_str << "\n:Customer Address: #{@customer_address}".rstrip
|
55
|
+
out_str << "\n:Total Amount: #{@total_amount}".rstrip
|
56
|
+
out_str[1..].to_s
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../parsing'
|
4
|
+
require_relative 'delivery_note_v1_document'
|
5
|
+
|
6
|
+
module Mindee
|
7
|
+
module Product
|
8
|
+
module DeliveryNote
|
9
|
+
# Delivery note API version 1.1 page data.
|
10
|
+
class DeliveryNoteV1Page < Mindee::Parsing::Common::Page
|
11
|
+
# @param prediction [Hash]
|
12
|
+
def initialize(prediction)
|
13
|
+
super(prediction)
|
14
|
+
@prediction = DeliveryNoteV1PagePrediction.new(
|
15
|
+
prediction['prediction'],
|
16
|
+
prediction['id']
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Delivery note V1 page prediction.
|
22
|
+
class DeliveryNoteV1PagePrediction < DeliveryNoteV1Document
|
23
|
+
# @return [String]
|
24
|
+
def to_s
|
25
|
+
out_str = String.new
|
26
|
+
out_str << "\n#{super}"
|
27
|
+
out_str
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -6,7 +6,7 @@ require_relative 'financial_document_v1_line_item'
|
|
6
6
|
module Mindee
|
7
7
|
module Product
|
8
8
|
module FinancialDocument
|
9
|
-
# Financial Document API version 1.
|
9
|
+
# Financial Document API version 1.11 document data.
|
10
10
|
class FinancialDocumentV1Document < Mindee::Parsing::Common::Prediction
|
11
11
|
include Mindee::Parsing::Standard
|
12
12
|
# The customer's address used for billing.
|
@@ -6,7 +6,7 @@ require_relative 'financial_document_v1_document'
|
|
6
6
|
module Mindee
|
7
7
|
module Product
|
8
8
|
module FinancialDocument
|
9
|
-
# Financial Document API version 1.
|
9
|
+
# Financial Document API version 1.11 page data.
|
10
10
|
class FinancialDocumentV1Page < Mindee::Parsing::Common::Page
|
11
11
|
# @param prediction [Hash]
|
12
12
|
def initialize(prediction)
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../parsing'
|
4
|
+
require_relative 'indian_passport_v1_document'
|
5
|
+
require_relative 'indian_passport_v1_page'
|
6
|
+
|
7
|
+
module Mindee
|
8
|
+
module Product
|
9
|
+
module IND
|
10
|
+
# Passport - India module.
|
11
|
+
module IndianPassport
|
12
|
+
# Passport - India API version 1 inference prediction.
|
13
|
+
class IndianPassportV1 < Mindee::Parsing::Common::Inference
|
14
|
+
@endpoint_name = 'ind_passport'
|
15
|
+
@endpoint_version = '1'
|
16
|
+
|
17
|
+
# @param prediction [Hash]
|
18
|
+
def initialize(prediction)
|
19
|
+
super
|
20
|
+
@prediction = IndianPassportV1Document.new(prediction['prediction'], nil)
|
21
|
+
@pages = []
|
22
|
+
prediction['pages'].each do |page|
|
23
|
+
if page.key?('prediction') && !page['prediction'].nil? && !page['prediction'].empty?
|
24
|
+
@pages.push(IndianPassportV1Page.new(page))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class << self
|
30
|
+
# Name of the endpoint for this product.
|
31
|
+
# @return [String]
|
32
|
+
attr_reader :endpoint_name
|
33
|
+
# Version for this product.
|
34
|
+
# @return [String]
|
35
|
+
attr_reader :endpoint_version
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../parsing'
|
4
|
+
|
5
|
+
module Mindee
|
6
|
+
module Product
|
7
|
+
module IND
|
8
|
+
module IndianPassport
|
9
|
+
# Passport - India API version 1.0 document data.
|
10
|
+
class IndianPassportV1Document < Mindee::Parsing::Common::Prediction
|
11
|
+
include Mindee::Parsing::Standard
|
12
|
+
# The first line of the address of the passport holder.
|
13
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
14
|
+
attr_reader :address1
|
15
|
+
# The second line of the address of the passport holder.
|
16
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
17
|
+
attr_reader :address2
|
18
|
+
# The third line of the address of the passport holder.
|
19
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
20
|
+
attr_reader :address3
|
21
|
+
# The birth date of the passport holder, ISO format: YYYY-MM-DD.
|
22
|
+
# @return [Mindee::Parsing::Standard::DateField]
|
23
|
+
attr_reader :birth_date
|
24
|
+
# The birth place of the passport holder.
|
25
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
26
|
+
attr_reader :birth_place
|
27
|
+
# ISO 3166-1 alpha-3 country code (3 letters format).
|
28
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
29
|
+
attr_reader :country
|
30
|
+
# The date when the passport will expire, ISO format: YYYY-MM-DD.
|
31
|
+
# @return [Mindee::Parsing::Standard::DateField]
|
32
|
+
attr_reader :expiry_date
|
33
|
+
# The file number of the passport document.
|
34
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
35
|
+
attr_reader :file_number
|
36
|
+
# The gender of the passport holder.
|
37
|
+
# @return [Mindee::Parsing::Standard::ClassificationField]
|
38
|
+
attr_reader :gender
|
39
|
+
# The given names of the passport holder.
|
40
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
41
|
+
attr_reader :given_names
|
42
|
+
# The identification number of the passport document.
|
43
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
44
|
+
attr_reader :id_number
|
45
|
+
# The date when the passport was issued, ISO format: YYYY-MM-DD.
|
46
|
+
# @return [Mindee::Parsing::Standard::DateField]
|
47
|
+
attr_reader :issuance_date
|
48
|
+
# The place where the passport was issued.
|
49
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
50
|
+
attr_reader :issuance_place
|
51
|
+
# The name of the legal guardian of the passport holder (if applicable).
|
52
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
53
|
+
attr_reader :legal_guardian
|
54
|
+
# The first line of the machine-readable zone (MRZ) of the passport document.
|
55
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
56
|
+
attr_reader :mrz1
|
57
|
+
# The second line of the machine-readable zone (MRZ) of the passport document.
|
58
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
59
|
+
attr_reader :mrz2
|
60
|
+
# The name of the mother of the passport holder.
|
61
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
62
|
+
attr_reader :name_of_mother
|
63
|
+
# The name of the spouse of the passport holder (if applicable).
|
64
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
65
|
+
attr_reader :name_of_spouse
|
66
|
+
# The date of issue of the old passport (if applicable), ISO format: YYYY-MM-DD.
|
67
|
+
# @return [Mindee::Parsing::Standard::DateField]
|
68
|
+
attr_reader :old_passport_date_of_issue
|
69
|
+
# The number of the old passport (if applicable).
|
70
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
71
|
+
attr_reader :old_passport_number
|
72
|
+
# The place of issue of the old passport (if applicable).
|
73
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
74
|
+
attr_reader :old_passport_place_of_issue
|
75
|
+
# The page number of the passport document.
|
76
|
+
# @return [Mindee::Parsing::Standard::ClassificationField]
|
77
|
+
attr_reader :page_number
|
78
|
+
# The surname of the passport holder.
|
79
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
80
|
+
attr_reader :surname
|
81
|
+
|
82
|
+
# @param prediction [Hash]
|
83
|
+
# @param page_id [Integer, nil]
|
84
|
+
def initialize(prediction, page_id)
|
85
|
+
super()
|
86
|
+
@address1 = StringField.new(prediction['address1'], page_id)
|
87
|
+
@address2 = StringField.new(prediction['address2'], page_id)
|
88
|
+
@address3 = StringField.new(prediction['address3'], page_id)
|
89
|
+
@birth_date = DateField.new(prediction['birth_date'], page_id)
|
90
|
+
@birth_place = StringField.new(prediction['birth_place'], page_id)
|
91
|
+
@country = StringField.new(prediction['country'], page_id)
|
92
|
+
@expiry_date = DateField.new(prediction['expiry_date'], page_id)
|
93
|
+
@file_number = StringField.new(prediction['file_number'], page_id)
|
94
|
+
@gender = ClassificationField.new(prediction['gender'], page_id)
|
95
|
+
@given_names = StringField.new(prediction['given_names'], page_id)
|
96
|
+
@id_number = StringField.new(prediction['id_number'], page_id)
|
97
|
+
@issuance_date = DateField.new(prediction['issuance_date'], page_id)
|
98
|
+
@issuance_place = StringField.new(prediction['issuance_place'], page_id)
|
99
|
+
@legal_guardian = StringField.new(prediction['legal_guardian'], page_id)
|
100
|
+
@mrz1 = StringField.new(prediction['mrz1'], page_id)
|
101
|
+
@mrz2 = StringField.new(prediction['mrz2'], page_id)
|
102
|
+
@name_of_mother = StringField.new(prediction['name_of_mother'], page_id)
|
103
|
+
@name_of_spouse = StringField.new(prediction['name_of_spouse'], page_id)
|
104
|
+
@old_passport_date_of_issue = DateField.new(prediction['old_passport_date_of_issue'], page_id)
|
105
|
+
@old_passport_number = StringField.new(prediction['old_passport_number'], page_id)
|
106
|
+
@old_passport_place_of_issue = StringField.new(prediction['old_passport_place_of_issue'], page_id)
|
107
|
+
@page_number = ClassificationField.new(prediction['page_number'], page_id)
|
108
|
+
@surname = StringField.new(prediction['surname'], page_id)
|
109
|
+
end
|
110
|
+
|
111
|
+
# @return [String]
|
112
|
+
def to_s
|
113
|
+
out_str = String.new
|
114
|
+
out_str << "\n:Page Number: #{@page_number}".rstrip
|
115
|
+
out_str << "\n:Country: #{@country}".rstrip
|
116
|
+
out_str << "\n:ID Number: #{@id_number}".rstrip
|
117
|
+
out_str << "\n:Given Names: #{@given_names}".rstrip
|
118
|
+
out_str << "\n:Surname: #{@surname}".rstrip
|
119
|
+
out_str << "\n:Birth Date: #{@birth_date}".rstrip
|
120
|
+
out_str << "\n:Birth Place: #{@birth_place}".rstrip
|
121
|
+
out_str << "\n:Issuance Place: #{@issuance_place}".rstrip
|
122
|
+
out_str << "\n:Gender: #{@gender}".rstrip
|
123
|
+
out_str << "\n:Issuance Date: #{@issuance_date}".rstrip
|
124
|
+
out_str << "\n:Expiry Date: #{@expiry_date}".rstrip
|
125
|
+
out_str << "\n:MRZ Line 1: #{@mrz1}".rstrip
|
126
|
+
out_str << "\n:MRZ Line 2: #{@mrz2}".rstrip
|
127
|
+
out_str << "\n:Legal Guardian: #{@legal_guardian}".rstrip
|
128
|
+
out_str << "\n:Name of Spouse: #{@name_of_spouse}".rstrip
|
129
|
+
out_str << "\n:Name of Mother: #{@name_of_mother}".rstrip
|
130
|
+
out_str << "\n:Old Passport Date of Issue: #{@old_passport_date_of_issue}".rstrip
|
131
|
+
out_str << "\n:Old Passport Number: #{@old_passport_number}".rstrip
|
132
|
+
out_str << "\n:Address Line 1: #{@address1}".rstrip
|
133
|
+
out_str << "\n:Address Line 2: #{@address2}".rstrip
|
134
|
+
out_str << "\n:Address Line 3: #{@address3}".rstrip
|
135
|
+
out_str << "\n:Old Passport Place of Issue: #{@old_passport_place_of_issue}".rstrip
|
136
|
+
out_str << "\n:File Number: #{@file_number}".rstrip
|
137
|
+
out_str[1..].to_s
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../parsing'
|
4
|
+
require_relative 'indian_passport_v1_document'
|
5
|
+
|
6
|
+
module Mindee
|
7
|
+
module Product
|
8
|
+
module IND
|
9
|
+
module IndianPassport
|
10
|
+
# Passport - India API version 1.0 page data.
|
11
|
+
class IndianPassportV1Page < Mindee::Parsing::Common::Page
|
12
|
+
# @param prediction [Hash]
|
13
|
+
def initialize(prediction)
|
14
|
+
super(prediction)
|
15
|
+
@prediction = IndianPassportV1PagePrediction.new(
|
16
|
+
prediction['prediction'],
|
17
|
+
prediction['id']
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Passport - India V1 page prediction.
|
23
|
+
class IndianPassportV1PagePrediction < IndianPassportV1Document
|
24
|
+
# @return [String]
|
25
|
+
def to_s
|
26
|
+
out_str = String.new
|
27
|
+
out_str << "\n#{super}"
|
28
|
+
out_str
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -6,7 +6,7 @@ require_relative 'invoice_v4_line_item'
|
|
6
6
|
module Mindee
|
7
7
|
module Product
|
8
8
|
module Invoice
|
9
|
-
# Invoice API version 4.
|
9
|
+
# Invoice API version 4.9 document data.
|
10
10
|
class InvoiceV4Document < Mindee::Parsing::Common::Prediction
|
11
11
|
include Mindee::Parsing::Standard
|
12
12
|
# The customer's address used for billing.
|
@@ -6,7 +6,7 @@ require_relative 'invoice_v4_document'
|
|
6
6
|
module Mindee
|
7
7
|
module Product
|
8
8
|
module Invoice
|
9
|
-
# Invoice API version 4.
|
9
|
+
# Invoice API version 4.9 page data.
|
10
10
|
class InvoiceV4Page < Mindee::Parsing::Common::Page
|
11
11
|
# @param prediction [Hash]
|
12
12
|
def initialize(prediction)
|
@@ -10,7 +10,7 @@ require_relative 'resume_v1_certificate'
|
|
10
10
|
module Mindee
|
11
11
|
module Product
|
12
12
|
module Resume
|
13
|
-
# Resume API version 1.
|
13
|
+
# Resume API version 1.1 document data.
|
14
14
|
class ResumeV1Document < Mindee::Parsing::Common::Prediction
|
15
15
|
include Mindee::Parsing::Standard
|
16
16
|
# The location information of the candidate, including city, state, and country.
|
@@ -252,6 +252,7 @@ module Mindee
|
|
252
252
|
out_str << ' '
|
253
253
|
out_str << "+#{char * 17}"
|
254
254
|
out_str << "+#{char * 12}"
|
255
|
+
out_str << "+#{char * 38}"
|
255
256
|
out_str << "+#{char * 27}"
|
256
257
|
out_str << "+#{char * 11}"
|
257
258
|
out_str << "+#{char * 10}"
|
@@ -274,6 +275,7 @@ module Mindee
|
|
274
275
|
out_str << "\n |"
|
275
276
|
out_str << ' Contract Type |'
|
276
277
|
out_str << ' Department |'
|
278
|
+
out_str << ' Description |'
|
277
279
|
out_str << ' Employer |'
|
278
280
|
out_str << ' End Month |'
|
279
281
|
out_str << ' End Year |'
|
@@ -6,7 +6,7 @@ require_relative 'resume_v1_document'
|
|
6
6
|
module Mindee
|
7
7
|
module Product
|
8
8
|
module Resume
|
9
|
-
# Resume API version 1.
|
9
|
+
# Resume API version 1.1 page data.
|
10
10
|
class ResumeV1Page < Mindee::Parsing::Common::Page
|
11
11
|
# @param prediction [Hash]
|
12
12
|
def initialize(prediction)
|
@@ -14,6 +14,9 @@ module Mindee
|
|
14
14
|
# The specific department or division within the company.
|
15
15
|
# @return [String]
|
16
16
|
attr_reader :department
|
17
|
+
# The description of the professional experience as written in the document.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :description
|
17
20
|
# The name of the company or organization.
|
18
21
|
# @return [String]
|
19
22
|
attr_reader :employer
|
@@ -39,6 +42,7 @@ module Mindee
|
|
39
42
|
super(prediction, page_id)
|
40
43
|
@contract_type = prediction['contract_type']
|
41
44
|
@department = prediction['department']
|
45
|
+
@description = prediction['description']
|
42
46
|
@employer = prediction['employer']
|
43
47
|
@end_month = prediction['end_month']
|
44
48
|
@end_year = prediction['end_year']
|
@@ -53,6 +57,7 @@ module Mindee
|
|
53
57
|
printable = {}
|
54
58
|
printable[:contract_type] = format_for_display(@contract_type)
|
55
59
|
printable[:department] = format_for_display(@department)
|
60
|
+
printable[:description] = format_for_display(@description)
|
56
61
|
printable[:employer] = format_for_display(@employer)
|
57
62
|
printable[:end_month] = format_for_display(@end_month)
|
58
63
|
printable[:end_year] = format_for_display(@end_year)
|
@@ -67,6 +72,7 @@ module Mindee
|
|
67
72
|
printable = {}
|
68
73
|
printable[:contract_type] = format_for_display(@contract_type, 15)
|
69
74
|
printable[:department] = format_for_display(@department, 10)
|
75
|
+
printable[:description] = format_for_display(@description, 36)
|
70
76
|
printable[:employer] = format_for_display(@employer, 25)
|
71
77
|
printable[:end_month] = format_for_display(@end_month, nil)
|
72
78
|
printable[:end_year] = format_for_display(@end_year, nil)
|
@@ -82,6 +88,7 @@ module Mindee
|
|
82
88
|
out_str = String.new
|
83
89
|
out_str << format('| %- 16s', printable[:contract_type])
|
84
90
|
out_str << format('| %- 11s', printable[:department])
|
91
|
+
out_str << format('| %- 37s', printable[:description])
|
85
92
|
out_str << format('| %- 26s', printable[:employer])
|
86
93
|
out_str << format('| %- 10s', printable[:end_month])
|
87
94
|
out_str << format('| %- 9s', printable[:end_year])
|
@@ -97,6 +104,7 @@ module Mindee
|
|
97
104
|
out_str = String.new
|
98
105
|
out_str << "\n :Contract Type: #{printable[:contract_type]}"
|
99
106
|
out_str << "\n :Department: #{printable[:department]}"
|
107
|
+
out_str << "\n :Description: #{printable[:description]}"
|
100
108
|
out_str << "\n :Employer: #{printable[:employer]}"
|
101
109
|
out_str << "\n :End Month: #{printable[:end_month]}"
|
102
110
|
out_str << "\n :End Year: #{printable[:end_year]}"
|
data/lib/mindee/product.rb
CHANGED
@@ -2,15 +2,10 @@
|
|
2
2
|
|
3
3
|
require_relative 'product/barcode_reader/barcode_reader_v1'
|
4
4
|
require_relative 'product/bill_of_lading/bill_of_lading_v1'
|
5
|
+
require_relative 'product/business_card/business_card_v1'
|
5
6
|
require_relative 'product/custom/custom_v1'
|
6
|
-
require_relative 'product/proof_of_address/proof_of_address_v1'
|
7
|
-
require_relative 'product/financial_document/financial_document_v1'
|
8
|
-
require_relative 'product/invoice/invoice_v4'
|
9
7
|
require_relative 'product/cropper/cropper_v1'
|
10
|
-
require_relative 'product/
|
11
|
-
require_relative 'product/passport/passport_v1'
|
12
|
-
require_relative 'product/receipt/receipt_v4'
|
13
|
-
require_relative 'product/receipt/receipt_v5'
|
8
|
+
require_relative 'product/delivery_note/delivery_note_v1'
|
14
9
|
require_relative 'product/eu/license_plate/license_plate_v1'
|
15
10
|
require_relative 'product/eu/driver_license/driver_license_v1'
|
16
11
|
require_relative 'product/fr/bank_account_details/bank_account_details_v1'
|
@@ -22,11 +17,19 @@ require_relative 'product/fr/id_card/id_card_v1'
|
|
22
17
|
require_relative 'product/fr/id_card/id_card_v2'
|
23
18
|
require_relative 'product/fr/energy_bill/energy_bill_v1'
|
24
19
|
require_relative 'product/fr/payslip/payslip_v2'
|
20
|
+
require_relative 'product/financial_document/financial_document_v1'
|
25
21
|
require_relative 'product/generated/generated_v1'
|
22
|
+
require_relative 'product/ind/indian_passport/indian_passport_v1'
|
23
|
+
require_relative 'product/invoice/invoice_v4'
|
26
24
|
require_relative 'product/invoice_splitter/invoice_splitter_v1'
|
27
25
|
require_relative 'product/international_id/international_id_v1'
|
28
26
|
require_relative 'product/international_id/international_id_v2'
|
27
|
+
require_relative 'product/multi_receipts_detector/multi_receipts_detector_v1'
|
29
28
|
require_relative 'product/nutrition_facts_label/nutrition_facts_label_v1'
|
29
|
+
require_relative 'product/passport/passport_v1'
|
30
|
+
require_relative 'product/proof_of_address/proof_of_address_v1'
|
31
|
+
require_relative 'product/receipt/receipt_v4'
|
32
|
+
require_relative 'product/receipt/receipt_v5'
|
30
33
|
require_relative 'product/resume/resume_v1'
|
31
34
|
require_relative 'product/us/bank_check/bank_check_v1'
|
32
35
|
require_relative 'product/us/driver_license/driver_license_v1'
|
data/lib/mindee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mindee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindee, SA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: marcel
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- docs/bank_statement_fr_v1.md
|
157
157
|
- docs/barcode_reader_v1.md
|
158
158
|
- docs/bill_of_lading_v1.md
|
159
|
+
- docs/business_card_v1.md
|
159
160
|
- docs/carte_grise_v1.md
|
160
161
|
- docs/carte_vitale_v1.md
|
161
162
|
- docs/code_samples/bank_account_details_v1.txt
|
@@ -164,20 +165,24 @@ files:
|
|
164
165
|
- docs/code_samples/bank_statement_fr_v1_async.txt
|
165
166
|
- docs/code_samples/barcode_reader_v1.txt
|
166
167
|
- docs/code_samples/bill_of_lading_v1_async.txt
|
168
|
+
- docs/code_samples/business_card_v1_async.txt
|
167
169
|
- docs/code_samples/carte_grise_v1.txt
|
168
170
|
- docs/code_samples/carte_vitale_v1.txt
|
169
171
|
- docs/code_samples/cropper_v1.txt
|
170
172
|
- docs/code_samples/custom_v1.txt
|
171
173
|
- docs/code_samples/default.txt
|
172
174
|
- docs/code_samples/default_async.txt
|
175
|
+
- docs/code_samples/delivery_notes_v1_async.txt
|
173
176
|
- docs/code_samples/energy_bill_fra_v1_async.txt
|
174
177
|
- docs/code_samples/eu_driver_license_v1.txt
|
175
178
|
- docs/code_samples/expense_receipts_v4.txt
|
176
179
|
- docs/code_samples/expense_receipts_v5.txt
|
180
|
+
- docs/code_samples/expense_receipts_v5_async.txt
|
177
181
|
- docs/code_samples/financial_document_v1.txt
|
178
182
|
- docs/code_samples/financial_document_v1_async.txt
|
179
183
|
- docs/code_samples/idcard_fr_v1.txt
|
180
184
|
- docs/code_samples/idcard_fr_v2.txt
|
185
|
+
- docs/code_samples/ind_passport_v1_async.txt
|
181
186
|
- docs/code_samples/international_id_v1_async.txt
|
182
187
|
- docs/code_samples/international_id_v2_async.txt
|
183
188
|
- docs/code_samples/invoice_splitter_v1_async.txt
|
@@ -196,6 +201,7 @@ files:
|
|
196
201
|
- docs/code_samples/us_w9_v1.txt
|
197
202
|
- docs/cropper_v1.md
|
198
203
|
- docs/custom_v1.md
|
204
|
+
- docs/delivery_notes_v1.md
|
199
205
|
- docs/energy_bill_fra_v1.md
|
200
206
|
- docs/eu_driver_license_v1.md
|
201
207
|
- docs/expense_receipts_v5.md
|
@@ -203,6 +209,7 @@ files:
|
|
203
209
|
- docs/generated_v1.md
|
204
210
|
- docs/getting_started.md
|
205
211
|
- docs/idcard_fr_v2.md
|
212
|
+
- docs/ind_passport_v1.md
|
206
213
|
- docs/international_id_v2.md
|
207
214
|
- docs/invoice_splitter_v1.md
|
208
215
|
- docs/invoices_v4.md
|
@@ -301,12 +308,18 @@ files:
|
|
301
308
|
- lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb
|
302
309
|
- lib/mindee/product/bill_of_lading/bill_of_lading_v1_page.rb
|
303
310
|
- lib/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rb
|
311
|
+
- lib/mindee/product/business_card/business_card_v1.rb
|
312
|
+
- lib/mindee/product/business_card/business_card_v1_document.rb
|
313
|
+
- lib/mindee/product/business_card/business_card_v1_page.rb
|
304
314
|
- lib/mindee/product/cropper/cropper_v1.rb
|
305
315
|
- lib/mindee/product/cropper/cropper_v1_document.rb
|
306
316
|
- lib/mindee/product/cropper/cropper_v1_page.rb
|
307
317
|
- lib/mindee/product/custom/custom_v1.rb
|
308
318
|
- lib/mindee/product/custom/custom_v1_document.rb
|
309
319
|
- lib/mindee/product/custom/custom_v1_page.rb
|
320
|
+
- lib/mindee/product/delivery_note/delivery_note_v1.rb
|
321
|
+
- lib/mindee/product/delivery_note/delivery_note_v1_document.rb
|
322
|
+
- lib/mindee/product/delivery_note/delivery_note_v1_page.rb
|
310
323
|
- lib/mindee/product/eu/driver_license/driver_license_v1.rb
|
311
324
|
- lib/mindee/product/eu/driver_license/driver_license_v1_document.rb
|
312
325
|
- lib/mindee/product/eu/driver_license/driver_license_v1_page.rb
|
@@ -364,6 +377,9 @@ files:
|
|
364
377
|
- lib/mindee/product/generated/generated_v1_document.rb
|
365
378
|
- lib/mindee/product/generated/generated_v1_page.rb
|
366
379
|
- lib/mindee/product/generated/generated_v1_prediction.rb
|
380
|
+
- lib/mindee/product/ind/indian_passport/indian_passport_v1.rb
|
381
|
+
- lib/mindee/product/ind/indian_passport/indian_passport_v1_document.rb
|
382
|
+
- lib/mindee/product/ind/indian_passport/indian_passport_v1_page.rb
|
367
383
|
- lib/mindee/product/international_id/international_id_v1.rb
|
368
384
|
- lib/mindee/product/international_id/international_id_v1_document.rb
|
369
385
|
- lib/mindee/product/international_id/international_id_v1_page.rb
|