Canada (Québec French) — street-type-first
French layout ('3700, rue Saint-Denis'); Québec French detection is included in Core.
3700, rue Saint-Denis, Montreal, QC H2X 3L7
Core interface and expected output
AddressTokenizer.parse(String rawAddress)io.passioncore.addresstokenizer.model.ParsedAddress{
"raw": "3700, RUE SAINT-DENIS, MONTREAL, QC H2X 3L7",
"tokens": [
{
"type": "POSTAL_CODE",
"value": "H2X 3L7"
},
{
"type": "STATE_CODE",
"value": "QC"
},
{
"type": "CITY",
"value": "MONTREAL"
},
{
"type": "HOUSE_NO",
"value": "3700"
},
{
"type": "STREET_TYPE",
"value": "RUE"
},
{
"type": "STREET_NAME",
"value": "SAINT-DENIS"
},
{
"type": "COUNTRY_CODE",
"value": "CA"
}
],
"diagnostics": {
"confidence": {
"parse": 0.95,
"gazetteer": 0.95,
"final": 0.95
},
"needsReview": false
}
}Commercial interface and expected output
AddressEnrichmentService.parse(String rawAddress)io.passioncore.addresstokenizer.model.ParsedAddress{
"raw": "3700, rue Saint-Denis, Montreal, QC H2X 3L7",
"tokens": [
{
"type": "POSTAL_CODE",
"value": "H2X 3L7"
},
{
"type": "STATE_CODE",
"value": "QC"
},
{
"type": "CITY",
"value": "MONTREAL"
},
{
"type": "HOUSE_NO",
"value": "3700"
},
{
"type": "STREET_TYPE",
"value": "RUE"
},
{
"type": "STREET_NAME",
"value": "SAINT-DENIS"
},
{
"type": "COUNTRY_CODE",
"value": "CA"
},
{
"type": "COUNTRY",
"value": "Canada"
}
],
"diagnostics": {
"confidence": {
"parse": 0.95,
"gazetteer": 0.93,
"final": 0.93
},
"needsReview": false,
"countryCodeStatus": "VALID_ISO3166",
"inputStructure": "STRUCTURED",
"cbprStructured": true,
"fintracPoBoxInvalid": false,
"fieldConfidences": {
"streetName": {
"confidence": 0.7
},
"buildingName": {
"confidence": 0.7
},
"postalCode": {
"confidence": 0.8
},
"townName": {
"confidence": 0.93
},
"country": {
"confidence": 0.93
}
},
"traceLogs": [
{
"field": "streetName",
"value": "RUE SAINT-DENIS",
"reason": "Parsed from raw input (token confidence=0.7)"
},
{
"field": "buildingName",
"value": "3700",
"reason": "Parsed from raw input (token confidence=0.7)"
},
{
"field": "postalCode",
"value": "H2X 3L7",
"reason": "Parsed from raw input (confidence=0.8)"
},
{
"field": "country",
"value": "CA",
"reason": "Country code 'CA' is a valid ISO 3166-1 alpha-2 code"
},
{
"field": "townName",
"value": "MONTREAL",
"reason": "P3-GN-ASCII: matched in GeoNames ASCII names; base=0.93-> final=0.93"
},
{
"field": "subDivision",
"value": "CA-QC",
"reason": "Sub-division 'CA-QC' resolved via exact ISO 3166-2 match"
}
]
}
}Full enrichment output — reference data, healing, and ISO 20022 mapping
Same parse, taken further: curated reference-data enrichment, data healing where supported, field-level confidence, traceable output, and ISO 20022 / pacs.008 mapping.
AddressEnrichmentService.parse(String rawAddress)io.passioncore.addresstokenizer.model.ParsedAddress{
"raw": "3700, rue Saint-Denis, Montreal, QC H2X 3L7",
"diagnostics": {
"confidence": {
"parse": 0.95,
"gazetteer": 0.93,
"final": 0.93
},
"needsReview": false,
"countryCodeStatus": "VALID_ISO3166",
"inputStructure": "STRUCTURED",
"cbprStructured": true,
"fintracPoBoxInvalid": false,
"traceLogs": [
{
"field": "streetName",
"value": "RUE SAINT-DENIS",
"reason": "Parsed from raw input (token confidence=0.7)"
},
{
"field": "buildingName",
"value": "3700",
"reason": "Parsed from raw input (token confidence=0.7)"
},
{
"field": "postalCode",
"value": "H2X 3L7",
"reason": "Parsed from raw input (confidence=0.8)"
},
{
"field": "country",
"value": "CA",
"reason": "Country code 'CA' is a valid ISO 3166-1 alpha-2 code"
},
{
"field": "townName",
"value": "MONTREAL",
"reason": "P3-GN-ASCII: matched in GeoNames ASCII names; base=0.93-> final=0.93"
},
{
"field": "subDivision",
"value": "CA-QC",
"reason": "Sub-division 'CA-QC' resolved via exact ISO 3166-2 match"
}
]
},
"general": {
"countryCode": "CA",
"countryName": "Canada",
"streetName": "RUE SAINT-DENIS",
"buildingName": "3700",
"city": "MONTREAL",
"state": "QC",
"postalCode": "H2X 3L7",
"parseConfidence": 0.95,
"fieldConfidences": {
"streetName": {
"confidence": 0.7
},
"buildingName": {
"confidence": 0.7
},
"postalCode": {
"confidence": 0.8
},
"townName": {
"confidence": 0.93
},
"country": {
"confidence": 0.93
}
}
},
"iso20022Result": {
"strtNm": "RUE SAINT-DENIS",
"bldgNb": "3700",
"pstCd": "H2X 3L7",
"twnNm": "MONTREAL",
"ctry": "CA",
"ctrySubDvsn": "CA-QC",
"fieldConfidence": {
"strtNm": {
"confidence": 0.7
},
"bldgNb": {
"confidence": 0.7
},
"pstCd": {
"confidence": 0.8
},
"twnNm": {
"confidence": 0.93
},
"ctry": {
"confidence": 0.93
},
"ctrySubDvsn": {
"confidence": 0.93
}
}
}
}Pacs008AddressSerializer.serialize(PostalAddress)pacs.008 PostalAddress XML fragment<PstlAdr>
<BldgNb>3700</BldgNb>
<StrtNm>RUE SAINT-DENIS</StrtNm>
<PstCd>H2X 3L7</PstCd>
<TwnNm>MONTREAL</TwnNm>
<CtrySubDvsn>CA-QC</CtrySubDvsn>
<Ctry>CA</Ctry>
</PstlAdr>