From 883ef2ec568a5a3c94c9ee00a9f5e92d2f886c0a Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 14 Apr 2016 17:53:27 -0400 Subject: [PATCH] [dictionaries] Moving intersections to cross streets --- resources/addresses/en.yaml | 18 ++++++++++++++---- .../{intersections.txt => cross_streets.txt} | 0 .../address_expansions/address_dictionaries.py | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) rename resources/dictionaries/en/{intersections.txt => cross_streets.txt} (100%) diff --git a/resources/addresses/en.yaml b/resources/addresses/en.yaml index 32d286e5..0be679e4 100644 --- a/resources/addresses/en.yaml +++ b/resources/addresses/en.yaml @@ -456,16 +456,28 @@ levels: # These simple rules make it possible to create training examples # like: 26th/road Street/road and/intersection 6th/road Avenue/road -intersections: +cross_streets: # 26th & 6th Avenue and: *and # 26th @ Broadway - at: + at: &at canonical: at abbreviated: "@" canonical_probability: 0.7 abbreviated_probability: 0.3 sample: true + corner_of: + canonical: corner of + + intersection: + default: *and + probability: 0.7 + alternatives: + - alternative: *at + probability: 0.15 + - alternative: *corner_of + probability: 0.15 + # 26th betw 5th Ave and 6th Ave between: canonical: between @@ -474,8 +486,6 @@ intersections: abbreviated_probability: 0.5 sample: true parentheses_probability: 0.5 # Probability of using parentheses e.g. (between 5th and 6th) - corner_of: - canonical: corner of # PO Box addresses # ================ diff --git a/resources/dictionaries/en/intersections.txt b/resources/dictionaries/en/cross_streets.txt similarity index 100% rename from resources/dictionaries/en/intersections.txt rename to resources/dictionaries/en/cross_streets.txt diff --git a/scripts/geodata/address_expansions/address_dictionaries.py b/scripts/geodata/address_expansions/address_dictionaries.py index 8fde38dd..b75b7084 100644 --- a/scripts/geodata/address_expansions/address_dictionaries.py +++ b/scripts/geodata/address_expansions/address_dictionaries.py @@ -72,12 +72,12 @@ gazetteer_types = { 'concatenated_prefixes_separable': 'DICTIONARY_CONCATENATED_PREFIX_SEPARABLE', 'concatenated_suffixes_inseparable': 'DICTIONARY_CONCATENATED_SUFFIX_INSEPARABLE', 'concatenated_suffixes_separable': 'DICTIONARY_CONCATENATED_SUFFIX_SEPARABLE', + 'cross_streets': 'DICTIONARY_CROSS_STREET', 'directionals': 'DICTIONARY_DIRECTIONAL', 'elisions': 'DICTIONARY_ELISION', 'entrance': 'DICTIONARY_ENTRANCE', 'given_names': 'DICTIONARY_GIVEN_NAME', 'house_number': 'DICTIONARY_HOUSE_NUMBER', - 'intersections': 'DICTIONARY_INTERSECTION', 'level_types_basement': 'DICTIONARY_LEVEL_BASEMENT', 'level_types_mezzanine': 'DICTIONARY_LEVEL_MEZZANINE', 'level_types_numbered': 'DICTIONARY_LEVEL_NUMBERED',