@@ -70,12 +70,12 @@ print(result.document)
7070########
7171Document
7272########
73- :Mindee ID: 3e524d26-f7dc-4852-9bbf-833a127a9570
73+ :Mindee ID: 744748d5-9051-461c-b70c-bbf81f5ff943
7474:Filename: default_sample.jpg
7575
7676Inference
7777#########
78- :Product: mindee/invoices v4.10
78+ :Product: mindee/invoices v4.11
7979:Rotation applied: Yes
8080
8181Prediction
@@ -111,6 +111,8 @@ Prediction
111111:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
112112:Document Type: INVOICE
113113:Document Type Extended: INVOICE
114+ :Purchase Subcategory:
115+ :Purchase Category: miscellaneous
114116:Line Items:
115117 +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
116118 | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -158,6 +160,8 @@ Page 0
158160:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
159161:Document Type: INVOICE
160162:Document Type Extended: INVOICE
163+ :Purchase Subcategory:
164+ :Purchase Category: miscellaneous
161165:Line Items:
162166 +--------------------------------------+--------------+----------+------------+--------------+--------------+-----------------+------------+
163167 | Description | Product code | Quantity | Tax Amount | Tax Rate (%) | Total Amount | Unit of measure | Unit Price |
@@ -191,6 +195,21 @@ A typical `BaseField` object will have the following attributes:
191195Aside from the previous attributes, all basic fields have access to a custom ` __str__ ` method that can be used to print their value as a string.
192196
193197
198+ ### AddressField
199+ Aside from the basic ` BaseField ` attributes, the address field ` AddressField ` also implements the following:
200+
201+ * ** street_number** (` str ` ): String representation of the string number. Can be ` None ` .
202+ * ** street_name** (` str ` ): Name of the street. Can be ` None ` .
203+ * ** po_box** (` str ` ): String representation of the PO Box number. Can be ` None ` .
204+ * ** address_complement** (` str ` ): Address complement. Can be ` None ` .
205+ * ** city** (` str ` ): City name. Can be ` None ` .
206+ * ** postal_code** (` str ` ): String representation of the postal code. Can be ` None ` .
207+ * ** state** (` str ` ): State name. Can be ` None ` .
208+ * ** country** (` str ` ): Country name. Can be ` None ` .
209+
210+ Note: The ` value ` field of an AddressField should be a concatenation of the rest of the values.
211+
212+
194213### AmountField
195214The amount field ` AmountField ` only has one constraint: its ** value** is an ` Optional[float] ` .
196215
@@ -264,14 +283,33 @@ A `InvoiceV4LineItem` implements the following attributes:
264283The following fields are extracted for Invoice V4:
265284
266285## Billing Address
267- ** billing_address** ([ StringField ] ( #stringfield ) ): The customer billing address.
286+ ** billing_address** ([ AddressField ] ( #addressfield ) ): The customer billing address.
268287
269288``` py
270289print (result.document.inference.prediction.billing_address.value)
271290```
272291
292+ ## Purchase Category
293+ ** category** ([ ClassificationField] ( #classificationfield ) ): The purchase category.
294+
295+ #### Possible values include:
296+ - 'toll'
297+ - 'food'
298+ - 'parking'
299+ - 'transport'
300+ - 'accommodation'
301+ - 'telecom'
302+ - 'miscellaneous'
303+ - 'software'
304+ - 'shopping'
305+ - 'energy'
306+
307+ ``` py
308+ print (result.document.inference.prediction.category.value)
309+ ```
310+
273311## Customer Address
274- ** customer_address** ([ StringField ] ( #stringfield ) ): The address of the customer.
312+ ** customer_address** ([ AddressField ] ( #addressfield ) ): The address of the customer.
275313
276314``` py
277315print (result.document.inference.prediction.customer_address.value)
@@ -387,14 +425,38 @@ for reference_numbers_elem in result.document.inference.prediction.reference_num
387425```
388426
389427## Shipping Address
390- ** shipping_address** ([ StringField ] ( #stringfield ) ): Customer's delivery address.
428+ ** shipping_address** ([ AddressField ] ( #addressfield ) ): Customer's delivery address.
391429
392430``` py
393431print (result.document.inference.prediction.shipping_address.value)
394432```
395433
434+ ## Purchase Subcategory
435+ ** subcategory** ([ ClassificationField] ( #classificationfield ) ): The purchase subcategory for transport, food and shopping.
436+
437+ #### Possible values include:
438+ - 'plane'
439+ - 'taxi'
440+ - 'train'
441+ - 'restaurant'
442+ - 'shopping'
443+ - 'other'
444+ - 'groceries'
445+ - 'cultural'
446+ - 'electronics'
447+ - 'office_supplies'
448+ - 'micromobility'
449+ - 'car_rental'
450+ - 'public'
451+ - 'delivery'
452+ - None
453+
454+ ``` py
455+ print (result.document.inference.prediction.subcategory.value)
456+ ```
457+
396458## Supplier Address
397- ** supplier_address** ([ StringField ] ( #stringfield ) ): The address of the supplier or merchant.
459+ ** supplier_address** ([ AddressField ] ( #addressfield ) ): The address of the supplier or merchant.
398460
399461``` py
400462print (result.document.inference.prediction.supplier_address.value)
0 commit comments