[addresses] French address levels alphanumeric
This commit is contained in:
@@ -99,6 +99,20 @@ levels:
|
|||||||
direction: right
|
direction: right
|
||||||
numeric_probability: 0.75
|
numeric_probability: 0.75
|
||||||
ordinal_probability: 0.25
|
ordinal_probability: 0.25
|
||||||
|
niveau: &niveau
|
||||||
|
canonical: niveau
|
||||||
|
sample: true
|
||||||
|
canonical_probability: 0.9
|
||||||
|
sample_probability: 0.1
|
||||||
|
numeric:
|
||||||
|
direction: left
|
||||||
|
direction_probability: 0.8
|
||||||
|
add_number_phrase: true
|
||||||
|
add_number_phrase_probability: 0.2
|
||||||
|
ordinal:
|
||||||
|
direction: right
|
||||||
|
numeric_probability: 0.75
|
||||||
|
ordinal_probability: 0.25
|
||||||
bel_etage: &bel_etage
|
bel_etage: &bel_etage
|
||||||
canonical: bel étage
|
canonical: bel étage
|
||||||
sample: true
|
sample: true
|
||||||
@@ -199,6 +213,15 @@ levels:
|
|||||||
- alternative: *dernier_etage
|
- alternative: *dernier_etage
|
||||||
probability: 0.1
|
probability: 0.1
|
||||||
|
|
||||||
|
alphanumeric:
|
||||||
|
default: *etage
|
||||||
|
probability: 0.95
|
||||||
|
alternatives:
|
||||||
|
- alternative: *niveau
|
||||||
|
probability: 0.05
|
||||||
|
numeric_probability: 0.99
|
||||||
|
alpha_probability: 0.01
|
||||||
|
|
||||||
numbering_starts_at: 0
|
numbering_starts_at: 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class AddressConfig(object):
|
|||||||
self.cache = {}
|
self.cache = {}
|
||||||
|
|
||||||
for filename in os.listdir(config_dir):
|
for filename in os.listdir(config_dir):
|
||||||
if filename not in ('en.yaml', 'es.yaml'):
|
if filename not in ('en.yaml', 'es.yaml', 'fr.yaml'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
config = yaml.load(open(os.path.join(ADDRESS_CONFIG_DIR, filename)))
|
config = yaml.load(open(os.path.join(ADDRESS_CONFIG_DIR, filename)))
|
||||||
|
|||||||
Reference in New Issue
Block a user