diff --git a/docs/model/PL.html b/docs/model/PL.html index d58472f..0822fde 100644 --- a/docs/model/PL.html +++ b/docs/model/PL.html @@ -281,6 +281,15 @@ IT + + + + 🇯🇵 + + JP + @@ -799,6 +808,45 @@

Overview of concepts

+ + +
+ + +
+
+ + + postal-code-prefix + - Postal code prefix + + + + +
+ +
+ + + +
+
+ + + postal-code-suffix + - Postal code suffix + + + + +
+ +
+ + +
+ + @@ -1413,6 +1461,10 @@

Example addresses

+ + + + @@ -1520,6 +1572,10 @@

Example addresses

+ + + + country
PL
@@ -1677,6 +1733,10 @@

Example addresses

+ + + + country
PL
@@ -3742,7 +3802,7 @@

Formatting:

Flattened formatting:
address =
-streetbuilding/unit-typeunit-name
postal-codelocality1
country-name +streetbuilding/unit-typeunit-name
postal-code-prefix-postal-code-suffixlocality1
country-name

@@ -4066,7 +4126,7 @@

Parsing:

Regex Reference: kStreetOptionalPrefixRe => - (?:(?:ulica|ul\.?)\s*)? + (?:(?:ulica|ul\.?\W)\s*)? @@ -4485,7 +4545,7 @@

Parsing:

Regex Reference: kStreetOptionalPrefixRe => - (?:(?:ulica|ul\.?)\s*)? + (?:(?:ulica|ul\.?\W)\s*)? @@ -5579,6 +5639,263 @@
Flattened formatting:
+ + + + + + + +

Parsing:

+
+ + + + +
+ Decomposition + + (ParsePostalCodeOptionalSeparatorExpression) + + + Anchor beginning: True
+ + Capture Reference: ParsePostalCodeOptionalSeparatorExpression
+ + + +
+ + + Capture postal-code + + (MATCH_REQUIRED) + + + + Parts:
+
    + +
  • + + +
    + + + Capture postal-code-prefix + + (MATCH_REQUIRED) + + + + Parts:
    +
      + +
    • + + + + Regex Reference: kZipPrefixValueRe => + (?:\d{2}) + + + +
    • + +
    + + + +
    + + +
  • + +
  • + + +
    + + + No capturing pattern + + (MATCH_OPTIONAL) + + + + Parts:
    +
      + +
    • + + + +Separator: Regex Reference kZipCodeSeparatorsRe => + (?:[\s-]+) + + + +
    • + +
    + + + +
    + + +
  • + +
  • + + +
    + + + Capture postal-code-suffix + + (MATCH_OPTIONAL) + + + + Parts:
    +
      + +
    • + + + + Regex Reference: kZipSuffixValueRe => + (?:\d{3}) + + + +
    • + +
    + + + +
    + + +
  • + +
+ + + +
+ + + + + Anchor end: True
+
+ + + + +
+ +
+

Children:

+ +
+ + + + + + + +

Formatting:

+
+postal-code = +postal-code-prefix-postal-code-suffix +
+ +
Flattened formatting:
+
+postal-code =
+postal-code-prefix-postal-code-suffix +
+ +

+ # + + postal-code-prefix +

+
+ +Postal code prefix + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ # + + postal-code-suffix +

+
+ +Postal code suffix + + + + + + + + + + + + + + + + + + + + diff --git a/model/countries/PL/PL-parsing-rules.yaml b/model/countries/PL/PL-parsing-rules.yaml index 7ede4eb..90faf41 100644 --- a/model/countries/PL/PL-parsing-rules.yaml +++ b/model/countries/PL/PL-parsing-rules.yaml @@ -12,7 +12,7 @@ regex_definitions: # Regular expression to match the prefixes that indicate a house number. kStreetOptionalPrefixRe: - regex_fragment: '(?:(?:ulica|ul\.?)\s*)?' + regex_fragment: '(?:(?:ulica|ul\.?\W)\s*)?' # Regular expression to match the unit-types in Poland. kUnitTypeLiteralRe: @@ -247,3 +247,27 @@ test_parsing_definitions: output: postal-code-prefix: "00" postal-code-suffix: "843" +- id: "Test 17: street name starting with street prefix" + type: street-address-alternative-1 + input: "Ulubiona 9A/m.10" + output: + street-address-alternative-1: "Ulubiona 9A/m.10" + building-location: "Ulubiona 9A/m.10" + street: "Ulubiona" + building-and-unit: "9A/m.10" + building: "9A" + unit: "m.10" + unit-type: "m." + unit-name: "10" +- id: "Test 18: street name starting with street prefix without separator" + type: street-address-alternative-1 + input: "ul.Ulubiona 9A/m.10" + output: + street-address-alternative-1: "ul.Ulubiona 9A/m.10" + building-location: "ul.Ulubiona 9A/m.10" + street: "Ulubiona" + building-and-unit: "9A/m.10" + building: "9A" + unit: "m.10" + unit-type: "m." + unit-name: "10"