@@ -22,7 +22,7 @@ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
2222# Parse the file
2323result = mindee_client.enqueue_and_parse(
2424 input_source,
25- Mindee ::Product ::US ::UsMail ::UsMailV2
25+ Mindee ::Product ::US ::UsMail ::UsMailV3
2626)
2727
2828# Print a full summary of the parsed data in RST format
@@ -35,7 +35,20 @@ puts result.document
3535
3636** Output (RST):**
3737``` rst
38- :Sender Name: zed
38+ ########
39+ Document
40+ ########
41+ :Mindee ID: f9c36f59-977d-4ddc-9f2d-31c294c456ac
42+ :Filename: default_sample.jpg
43+
44+ Inference
45+ #########
46+ :Product: mindee/us_mail v3.0
47+ :Rotation applied: Yes
48+
49+ Prediction
50+ ==========
51+ :Sender Name: company zed
3952:Sender Address:
4053 :City: Dallas
4154 :Complete Address: 54321 Elm Street, Dallas, Texas 54321
@@ -44,11 +57,12 @@ puts result.document
4457 :Street: 54321 Elm Street
4558:Recipient Names: Jane Doe
4659:Recipient Addresses:
47- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
48- | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street |
49- +=================+=====================================+===================+=============+========================+=======+===========================+
50- | Detroit | 1234 Market Street PMB 4321, Det... | | 12345 | 4321 | MI | 1234 Market Street |
51- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
60+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
61+ | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street | Unit |
62+ +=================+=====================================+===================+=============+========================+=======+===========================+=================+
63+ | Detroit | 1234 Market Street PMB 4321, Det... | False | 12345 | 4321 | MI | 1234 Market Street | |
64+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
65+ :Return to Sender: False
5266```
5367
5468# Field Types
@@ -78,7 +92,7 @@ Fields which are specific to this product; they are not used in any other produc
7892### Recipient Addresses Field
7993The addresses of the recipients.
8094
81- A ` UsMailV2RecipientAddress ` implements the following attributes:
95+ A ` UsMailV3RecipientAddress ` implements the following attributes:
8296
8397* ` city ` (String): The city of the recipient's address.
8498* ` complete ` (String): The complete address of the recipient.
@@ -87,12 +101,13 @@ A `UsMailV2RecipientAddress` implements the following attributes:
87101* ` private_mailbox_number ` (String): The private mailbox number of the recipient's address.
88102* ` state ` (String): Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
89103* ` street ` (String): The street of the recipient's address.
104+ * ` unit ` (String): The unit number of the recipient's address.
90105Fields which are specific to this product; they are not used in any other product.
91106
92107### Sender Address Field
93108The address of the sender.
94109
95- A ` UsMailV2SenderAddress ` implements the following attributes:
110+ A ` UsMailV3SenderAddress ` implements the following attributes:
96111
97112* ` city ` (String): The city of the sender's address.
98113* ` complete ` (String): The complete address of the sender.
@@ -101,10 +116,17 @@ A `UsMailV2SenderAddress` implements the following attributes:
101116* ` street ` (String): The street of the sender's address.
102117
103118# Attributes
104- The following fields are extracted for US Mail V2:
119+ The following fields are extracted for US Mail V3:
120+
121+ ## Return to Sender
122+ ** is_return_to_sender** ([ BooleanField] ( #boolean-field ) ): Whether the mailing is marked as return to sender.
123+
124+ ``` rb
125+ puts result.document.inference.prediction.is_return_to_sender.value
126+ ```
105127
106128## Recipient Addresses
107- ** recipient_addresses** (Array<[ UsMailV2RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
129+ ** recipient_addresses** (Array<[ UsMailV3RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
108130
109131``` rb
110132for recipient_addresses_elem in result.document.inference.prediction.recipient_addresses do
122144```
123145
124146## Sender Address
125- ** sender_address** ([ UsMailV2SenderAddress ] ( #sender-address-field ) ): The address of the sender.
147+ ** sender_address** ([ UsMailV3SenderAddress ] ( #sender-address-field ) ): The address of the sender.
126148
127149``` rb
128150puts result.document.inference.prediction.sender_address.value
0 commit comments