@@ -14,7 +14,7 @@ Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/mai
14
14
import com.mindee.MindeeClient ;
15
15
import com.mindee.input.LocalInputSource ;
16
16
import com.mindee.parsing.common.AsyncPredictResponse ;
17
- import com.mindee.product.us.usmail.UsMailV2 ;
17
+ import com.mindee.product.us.usmail.UsMailV3 ;
18
18
import java.io.File ;
19
19
import java.io.IOException ;
20
20
@@ -31,8 +31,8 @@ public class SimpleMindeeClient {
31
31
LocalInputSource inputSource = new LocalInputSource (new File (filePath));
32
32
33
33
// Parse the file asynchronously
34
- AsyncPredictResponse<UsMailV2 > response = mindeeClient. enqueueAndParse(
35
- UsMailV2 . class,
34
+ AsyncPredictResponse<UsMailV3 > response = mindeeClient. enqueueAndParse(
35
+ UsMailV3 . class,
36
36
inputSource
37
37
);
38
38
@@ -57,7 +57,20 @@ public class SimpleMindeeClient {
57
57
58
58
** Output (RST):**
59
59
``` rst
60
- :Sender Name: zed
60
+ ########
61
+ Document
62
+ ########
63
+ :Mindee ID: f9c36f59-977d-4ddc-9f2d-31c294c456ac
64
+ :Filename: default_sample.jpg
65
+
66
+ Inference
67
+ #########
68
+ :Product: mindee/us_mail v3.0
69
+ :Rotation applied: Yes
70
+
71
+ Prediction
72
+ ==========
73
+ :Sender Name: company zed
61
74
:Sender Address:
62
75
:City: Dallas
63
76
:Complete Address: 54321 Elm Street, Dallas, Texas 54321
@@ -66,11 +79,12 @@ public class SimpleMindeeClient {
66
79
:Street: 54321 Elm Street
67
80
:Recipient Names: Jane Doe
68
81
:Recipient Addresses:
69
- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
70
- | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street |
71
- +=================+=====================================+===================+=============+========================+=======+===========================+
72
- | Detroit | 1234 Market Street PMB 4321, Det... | | 12345 | 4321 | MI | 1234 Market Street |
73
- +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+
82
+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
83
+ | City | Complete Address | Is Address Change | Postal Code | Private Mailbox Number | State | Street | Unit |
84
+ +=================+=====================================+===================+=============+========================+=======+===========================+=================+
85
+ | Detroit | 1234 Market Street PMB 4321, Det... | False | 12345 | 4321 | MI | 1234 Market Street | |
86
+ +-----------------+-------------------------------------+-------------------+-------------+------------------------+-------+---------------------------+-----------------+
87
+ :Return to Sender: False
74
88
```
75
89
76
90
# Field Types
@@ -96,13 +110,17 @@ The text field `StringField` extends `BaseField`, but also implements:
96
110
* ** value** (` String ` ): corresponds to the field value.
97
111
* ** rawValue** (` String ` ): corresponds to the raw value as it appears on the document.
98
112
113
+ ### BooleanField
114
+ The boolean field ` BooleanField ` extends BaseField, but also implements:
115
+ * ** value** (` Boolean ` ): corresponds to the value of the field.
116
+
99
117
## Specific Fields
100
118
Fields which are specific to this product; they are not used in any other product.
101
119
102
120
### Recipient Addresses Field
103
121
The addresses of the recipients.
104
122
105
- A ` UsMailV2RecipientAddress ` implements the following attributes:
123
+ A ` UsMailV3RecipientAddress ` implements the following attributes:
106
124
107
125
* ** city** (` String ` ): The city of the recipient's address.
108
126
* ** complete** (` String ` ): The complete address of the recipient.
@@ -111,12 +129,13 @@ A `UsMailV2RecipientAddress` implements the following attributes:
111
129
* ** privateMailboxNumber** (` String ` ): The private mailbox number of the recipient's address.
112
130
* ** state** (` String ` ): Second part of the ISO 3166-2 code, consisting of two letters indicating the US State.
113
131
* ** street** (` String ` ): The street of the recipient's address.
132
+ * ** unit** (` String ` ): The unit number of the recipient's address.
114
133
Fields which are specific to this product; they are not used in any other product.
115
134
116
135
### Sender Address Field
117
136
The address of the sender.
118
137
119
- A ` UsMailV2SenderAddress ` implements the following attributes:
138
+ A ` UsMailV3SenderAddress ` implements the following attributes:
120
139
121
140
* ** city** (` String ` ): The city of the sender's address.
122
141
* ** complete** (` String ` ): The complete address of the sender.
@@ -125,10 +144,17 @@ A `UsMailV2SenderAddress` implements the following attributes:
125
144
* ** street** (` String ` ): The street of the sender's address.
126
145
127
146
# Attributes
128
- The following fields are extracted for US Mail V2:
147
+ The following fields are extracted for US Mail V3:
148
+
149
+ ## Return to Sender
150
+ ** isReturnToSender** : Whether the mailing is marked as return to sender.
151
+
152
+ ``` java
153
+ System . out. println(result. getDocument(). getInference(). getPrediction(). getIsReturnToSender(). value);
154
+ ```
129
155
130
156
## Recipient Addresses
131
- ** recipientAddresses** (List<[ UsMailV2RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
157
+ ** recipientAddresses** (List<[ UsMailV3RecipientAddress ] ( #recipient-addresses-field ) >): The addresses of the recipients.
132
158
133
159
``` java
134
160
for (recipientAddressesElem : result. getDocument(). getInference(). getPrediction(). getRecipientAddresses())
@@ -148,7 +174,7 @@ for (recipientNamesElem : result.getDocument().getInference().getPrediction().ge
148
174
```
149
175
150
176
## Sender Address
151
- ** senderAddress** ([ UsMailV2SenderAddress ] ( #sender-address-field ) ): The address of the sender.
177
+ ** senderAddress** ([ UsMailV3SenderAddress ] ( #sender-address-field ) ): The address of the sender.
152
178
153
179
``` java
154
180
System . out. println(result. getDocument(). getInference(). getPrediction(). getSenderAddress(). value);
0 commit comments