[formatting] Adding aliases in formatting config, so e.g. most of the Francophone world shares France's config without needing to be the case for every French address (e.g. Belgium), generic config for continental Europe, etc.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# nl.yaml
|
||||
# -------
|
||||
# Note: base config covers Dutch as spoken in the Netherlands
|
||||
# Belgium overrides go in country configs
|
||||
|
||||
|
||||
@@ -82,137 +82,8 @@ global:
|
||||
|
||||
# Overrides for languages (better for e.g. covering all French-speaking countries)
|
||||
languages:
|
||||
en:
|
||||
insertions:
|
||||
building:
|
||||
building_after_house:
|
||||
after: house
|
||||
probability: 0.6
|
||||
building_after_road:
|
||||
after: road
|
||||
probability: 0.3
|
||||
building_before_suburb:
|
||||
before: suburb
|
||||
probability: 0.1
|
||||
conditional:
|
||||
- component: subdivision
|
||||
probabilities:
|
||||
building_after_house:
|
||||
after: house
|
||||
probability: 0.6
|
||||
building_after_road:
|
||||
after: road
|
||||
probability: 0.2
|
||||
building_before_subdivision:
|
||||
before: subdivision
|
||||
probability: 0.2
|
||||
entrance:
|
||||
# e.g. 123 East 45th St, 6th Floor, NYC
|
||||
entrance_after_road:
|
||||
after: road
|
||||
probability: 0.75
|
||||
entrance_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
entrance_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.15
|
||||
conditional:
|
||||
- component: building
|
||||
probabilities:
|
||||
# default: 0.8
|
||||
entrance_after_building:
|
||||
after: building
|
||||
probability: 0.2
|
||||
|
||||
|
||||
staircase:
|
||||
# e.g. 123 East 45th St, Staircase C, NYC
|
||||
staircase_after_road:
|
||||
after: road
|
||||
probability: 0.5
|
||||
# e.g. Floor 1, Da Vinci House, 44 Saffron Hill, London
|
||||
staircase_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
staircase_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.4
|
||||
conditional:
|
||||
- component: entrance
|
||||
probabilities:
|
||||
# default: 0.1
|
||||
staircase_after_entrance:
|
||||
after: entrance
|
||||
probability: 0.9
|
||||
|
||||
level:
|
||||
# e.g. 123 East 45th St, 6th Floor, NYC
|
||||
level_after_road:
|
||||
after: road
|
||||
probability: 0.5
|
||||
# e.g. Floor 1, Da Vinci House, 44 Saffron Hill, London
|
||||
level_before_house:
|
||||
before: house
|
||||
probability: 0.25
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
level_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.25
|
||||
|
||||
conditional:
|
||||
- component: staircase
|
||||
probabilities:
|
||||
# default: 0.4
|
||||
level_after_staircase:
|
||||
after: staircase
|
||||
probability: 0.6
|
||||
- component: entrance
|
||||
probabilities:
|
||||
# default: 0.4
|
||||
level_after_entrance:
|
||||
after: entrance
|
||||
probability: 0.6
|
||||
|
||||
unit:
|
||||
# e.g. Flat 18, Da Vinci House, 44 Saffron Hill, London
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.2
|
||||
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.6
|
||||
|
||||
# e.g. Da Vinci House, 44 Saffron Hill, Flat 18, London (not as common in UK)
|
||||
unit_after_road:
|
||||
after: road
|
||||
probability: 0.2
|
||||
|
||||
conditional:
|
||||
- component: level
|
||||
probabilities:
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.1
|
||||
# e.g. Floor 5, Apt 6
|
||||
unit_after_level:
|
||||
after: level
|
||||
probability: 0.79
|
||||
# e.g. Apt. 6, 5/F (less common)
|
||||
unit_before_level:
|
||||
before: level
|
||||
probability: 0.01
|
||||
|
||||
es:
|
||||
insertions:
|
||||
continental_european_languages:
|
||||
insertions: &continental_european_template_insertions
|
||||
building:
|
||||
building_after_house_number:
|
||||
after: house_number
|
||||
@@ -234,7 +105,7 @@ languages:
|
||||
probability: 0.2
|
||||
|
||||
entrance:
|
||||
# e.g. 123 East 45th St, 6th Floor, NYC
|
||||
# e.g. Calle Foo 3, entrada 1
|
||||
entrance_after_house_number:
|
||||
after: house_number
|
||||
probability: 0.8
|
||||
@@ -346,15 +217,142 @@ languages:
|
||||
after: building
|
||||
probability: 0.9
|
||||
|
||||
en:
|
||||
insertions: &english_template_insertions
|
||||
building:
|
||||
building_after_house:
|
||||
after: house
|
||||
probability: 0.6
|
||||
building_after_road:
|
||||
after: road
|
||||
probability: 0.3
|
||||
building_before_suburb:
|
||||
before: suburb
|
||||
probability: 0.1
|
||||
conditional:
|
||||
- component: subdivision
|
||||
probabilities:
|
||||
building_after_house:
|
||||
after: house
|
||||
probability: 0.6
|
||||
building_after_road:
|
||||
after: road
|
||||
probability: 0.2
|
||||
building_before_subdivision:
|
||||
before: subdivision
|
||||
probability: 0.2
|
||||
entrance:
|
||||
# e.g. 123 East 45th St, 6th Floor, NYC
|
||||
entrance_after_road:
|
||||
after: road
|
||||
probability: 0.75
|
||||
entrance_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
entrance_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.15
|
||||
conditional:
|
||||
- component: building
|
||||
probabilities:
|
||||
# default: 0.8
|
||||
entrance_after_building:
|
||||
after: building
|
||||
probability: 0.2
|
||||
|
||||
fr:
|
||||
# libpostal issue #27
|
||||
insertions:
|
||||
city:
|
||||
city_before_road:
|
||||
before: road
|
||||
probability: 0.001
|
||||
staircase:
|
||||
# e.g. 123 East 45th St, Staircase C, NYC
|
||||
staircase_after_road:
|
||||
after: road
|
||||
probability: 0.5
|
||||
# e.g. Floor 1, Da Vinci House, 44 Saffron Hill, London
|
||||
staircase_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
staircase_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.4
|
||||
conditional:
|
||||
- component: entrance
|
||||
probabilities:
|
||||
# default: 0.1
|
||||
staircase_after_entrance:
|
||||
after: entrance
|
||||
probability: 0.9
|
||||
|
||||
level:
|
||||
# e.g. 123 East 45th St, 6th Floor, NYC
|
||||
level_after_road:
|
||||
after: road
|
||||
probability: 0.5
|
||||
# e.g. Floor 1, Da Vinci House, 44 Saffron Hill, London
|
||||
level_before_house:
|
||||
before: house
|
||||
probability: 0.25
|
||||
# e.g. Da Vinci House, 1st Floor, 44 Saffron Hill, London
|
||||
level_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.25
|
||||
|
||||
conditional:
|
||||
- component: staircase
|
||||
probabilities:
|
||||
# default: 0.4
|
||||
level_after_staircase:
|
||||
after: staircase
|
||||
probability: 0.6
|
||||
- component: entrance
|
||||
probabilities:
|
||||
# default: 0.4
|
||||
level_after_entrance:
|
||||
after: entrance
|
||||
probability: 0.6
|
||||
|
||||
unit:
|
||||
# e.g. Flat 18, Da Vinci House, 44 Saffron Hill, London
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.2
|
||||
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.6
|
||||
|
||||
# e.g. Da Vinci House, 44 Saffron Hill, Flat 18, London (not as common in UK)
|
||||
unit_after_road:
|
||||
after: road
|
||||
probability: 0.2
|
||||
|
||||
conditional:
|
||||
- component: level
|
||||
probabilities:
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.1
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.1
|
||||
# e.g. Floor 5, Apt 6
|
||||
unit_after_level:
|
||||
after: level
|
||||
probability: 0.79
|
||||
# e.g. Apt. 6, 5/F (less common)
|
||||
unit_before_level:
|
||||
before: level
|
||||
probability: 0.01
|
||||
|
||||
es:
|
||||
insertions: *continental_european_template_insertions
|
||||
|
||||
de:
|
||||
insertions: *continental_european_template_insertions
|
||||
|
||||
nl:
|
||||
insertions: *continental_european_template_insertions
|
||||
|
||||
countries:
|
||||
# Hungary, e.g. 1075, Budapest Kazinczy utca 14
|
||||
@@ -420,3 +418,88 @@ countries:
|
||||
before: level
|
||||
probability: 0.01
|
||||
|
||||
fr:
|
||||
insertions: &france_template_insertions
|
||||
<<: *english_template_insertions
|
||||
level:
|
||||
level_after_road:
|
||||
after: road
|
||||
probability: 0.95
|
||||
level_before_house:
|
||||
before: house
|
||||
probability: 0.01
|
||||
level_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.04
|
||||
|
||||
conditional:
|
||||
- component: staircase
|
||||
probabilities:
|
||||
level_after_staircase:
|
||||
after: staircase
|
||||
probability: 0.95
|
||||
- component: entrance
|
||||
probabilities:
|
||||
# default: 0.4
|
||||
level_after_entrance:
|
||||
after: entrance
|
||||
probability: 0.95
|
||||
|
||||
unit:
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.02
|
||||
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.03
|
||||
|
||||
# e.g. Da Vinci House, 44 Saffron Hill, Flat 18, London (not as common in UK)
|
||||
unit_after_road:
|
||||
after: road
|
||||
probability: 0.95
|
||||
|
||||
conditional:
|
||||
- component: level
|
||||
probabilities:
|
||||
unit_before_house:
|
||||
before: house
|
||||
probability: 0.005
|
||||
# e.g. Da Vinci House, Flat 18, 44 Saffron Hill, London
|
||||
unit_before_house_number:
|
||||
before: house_number
|
||||
probability: 0.01
|
||||
# e.g. Floor 5, Apt 6
|
||||
unit_after_level:
|
||||
after: level
|
||||
probability: 0.98
|
||||
# e.g. Apt. 6, 5/F (less common)
|
||||
unit_before_level:
|
||||
before: level
|
||||
probability: 0.005
|
||||
# libpostal issue #27
|
||||
city:
|
||||
city_before_road:
|
||||
before: road
|
||||
probability: 0.001
|
||||
|
||||
# Algeria
|
||||
dz_fr:
|
||||
insertions: *france_template_insertions
|
||||
|
||||
# Luxembourg
|
||||
lu_fr:
|
||||
insertions: *france_template_insertions
|
||||
|
||||
# Monaco
|
||||
mc:
|
||||
insertions: *france_template_insertions
|
||||
|
||||
# Senegal
|
||||
sn:
|
||||
insertions: *france_template_insertions
|
||||
|
||||
# Tunisia
|
||||
tn_fr:
|
||||
insertions: *france_template_insertions
|
||||
Reference in New Issue
Block a user