diff --git a/assets/dicts/locations.json b/assets/dicts/locations.json deleted file mode 100644 index eb050c4..0000000 --- a/assets/dicts/locations.json +++ /dev/null @@ -1,2459 +0,0 @@ -[ - { - "entry": "St. Gall.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2658822", - "lat": "47.42361", - "lon": "9.37722", - "country": "CH", - "greater_area": "St. Gallen", - "greater_area_type": "canton", - "region": "St. Gallen" - }, - { - "entry": "London", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643743", - "lat": "51.50853", - "lon": "-0.12574", - "country": "GB", - "greater_area": "Greater London", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655603", - "lat": "52.48142", - "lon": "-1.89983", - "country": "GB", - "greater_area": "West Midlands", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Selly Oak, Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "6947477", - "lat": "52.441", - "lon": "-1.935", - "country": "GB", - "greater_area": "West Midlands", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Manchester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643123", - "lat": "53.48095", - "lon": "-2.23743", - "country": "GB", - "greater_area": "Greater Manchester", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Liverpool", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644210", - "lat": "53.41058", - "lon": "-2.97794", - "country": "GB", - "greater_area": "Merseyside", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Sheffield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638077", - "lat": "53.38297", - "lon": "-1.4659", - "country": "GB", - "greater_area": "South Yorkshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Glasgow", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648579", - "lat": "55.86515", - "lon": "-4.25763", - "country": "GB", - "greater_area": "Glasgow City", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Coventry", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652221", - "lat": "52.40656", - "lon": "-1.51217", - "country": "GB", - "greater_area": "West Midlands", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bristol", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654675", - "lat": "51.45523", - "lon": "-2.59665", - "country": "GB", - "greater_area": "Bristol", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Gateshead", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648590", - "lat": "54.96209", - "lon": "-1.60182", - "country": "GB", - "greater_area": "Gateshead", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Newcastle-on-Tyne", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641673", - "lat": "54.97328", - "lon": "-1.61396", - "country": "GB", - "greater_area": "Newcastle upon Tyne", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Edinburgh", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650225", - "lat": "55.95206", - "lon": "-3.19648", - "country": "GB", - "greater_area": "Edinburgh", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Cardiff", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653822", - "lat": "51.48", - "lon": "-3.18", - "country": "GB", - "greater_area": "Cardiff", - "greater_area_type": "unitary authority", - "region": "Wales" - }, - { - "entry": "Stretford", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636663", - "lat": "53.44851", - "lon": "-2.30952", - "country": "GB", - "greater_area": "Trafford", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Bolton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655237", - "lat": "53.58333", - "lon": "-2.43333", - "country": "GB", - "greater_area": "Bolton", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Wigan", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634202", - "lat": "53.53333", - "lon": "-2.61667", - "country": "GB", - "greater_area": "Wigan", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Preston", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639912", - "lat": "53.76667", - "lon": "-2.71667", - "country": "GB", - "greater_area": "Lancashire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Blackburn", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655095", - "lat": "53.75", - "lon": "-2.48333", - "country": "GB", - "greater_area": "Blackburn with Darwen", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Bury", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654187", - "lat": "53.6", - "lon": "-2.3", - "country": "GB", - "greater_area": "Bury", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Oldham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641430", - "lat": "53.55", - "lon": "-2.11667", - "country": "GB", - "greater_area": "Oldham", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Stockport", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636940", - "lat": "53.40979", - "lon": "-2.15761", - "country": "GB", - "greater_area": "Stockport", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Halifax", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646886", - "lat": "53.71667", - "lon": "-1.85", - "country": "GB", - "greater_area": "Calderdale", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Clayton, Manchester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654710", - "lat": "53.48333", - "lon": "-2.2", - "country": "GB", - "greater_area": "Manchester", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Heywood, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647063", - "lat": "53.6", - "lon": "-2.21667", - "country": "GB", - "greater_area": "Rochdale", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Wednesbury", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634506", - "lat": "52.55", - "lon": "-2.01667", - "country": "GB", - "greater_area": "Sandwell", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "East Ardsley", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650941", - "lat": "53.73333", - "lon": "-1.5", - "country": "GB", - "greater_area": "Leeds", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Leeds", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644688", - "lat": "53.79648", - "lon": "-1.54785", - "country": "GB", - "greater_area": "Leeds", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Bradford", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654993", - "lat": "53.79391", - "lon": "-1.75206", - "country": "GB", - "greater_area": "Bradford", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Huddersfield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646708", - "lat": "53.64904", - "lon": "-1.78416", - "country": "GB", - "greater_area": "Kirklees", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Wakefield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634715", - "lat": "53.68331", - "lon": "-1.49768", - "country": "GB", - "greater_area": "Wakefield", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Sheffield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638077", - "lat": "53.38297", - "lon": "-1.4659", - "country": "GB", - "greater_area": "Sheffield", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Rotherham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638976", - "lat": "53.43012", - "lon": "-1.35678", - "country": "GB", - "greater_area": "Rotherham", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Maidenhead, Berks.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643044", - "lat": "51.51667", - "lon": "-0.7", - "country": "GB", - "greater_area": "Windsor and Maidenhead", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Harpenden, Herts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646880", - "lat": "51.81667", - "lon": "-0.35", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bridgend, Glam.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654743", - "lat": "51.50583", - "lon": "-3.57722", - "country": "GB", - "greater_area": "Bridgend", - "greater_area_type": "unitary authority", - "region": "Wales" - }, - { - "entry": "Dartford, Kent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2651470", - "lat": "51.447", - "lon": "0.219", - "country": "GB", - "greater_area": "Kent", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Dunstable, Beds.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650940", - "lat": "51.88333", - "lon": "-0.51667", - "country": "GB", - "greater_area": "Central Bedfordshire", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Nottingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641170", - "lat": "52.9536", - "lon": "-1.15047", - "country": "GB", - "greater_area": "Nottingham", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Derby", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2651347", - "lat": "52.92277", - "lon": "-1.47663", - "country": "GB", - "greater_area": "Derby", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Wythenshawe, Manchester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634600", - "lat": "53.4", - "lon": "-2.26667", - "country": "GB", - "greater_area": "Manchester", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Christchurch, Hants.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652708", - "lat": "50.73333", - "lon": "-1.78333", - "country": "GB", - "greater_area": "Dorset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bournemouth, Hants.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655095", - "lat": "50.71667", - "lon": "-1.88333", - "country": "GB", - "greater_area": "Bournemouth", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Poole, Dorset", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2640354", - "lat": "50.71667", - "lon": "-2", - "country": "GB", - "greater_area": "Poole", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Bath, Somerset", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656173", - "lat": "51.37795", - "lon": "-2.35907", - "country": "GB", - "greater_area": "Bath and North East Somerset", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Swindon, Wilts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636387", - "lat": "51.51667", - "lon": "-1.78333", - "country": "GB", - "greater_area": "Swindon", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Gloucester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648110", - "lat": "51.86568", - "lon": "-2.2431", - "country": "GB", - "greater_area": "Gloucester", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "High Wycombe", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646003", - "lat": "51.62907", - "lon": "-0.74934", - "country": "GB", - "greater_area": "Buckinghamshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Dukinfield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650941", - "lat": "53.46667", - "lon": "-2.08333", - "country": "GB", - "greater_area": "Tameside", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Stalybridge", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637343", - "lat": "53.48333", - "lon": "-2.05", - "country": "GB", - "greater_area": "Tameside", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Ashton-under-Lyne", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2657053", - "lat": "53.5", - "lon": "-2.1", - "country": "GB", - "greater_area": "Tameside", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Hyde", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646557", - "lat": "53.45", - "lon": "-2.08333", - "country": "GB", - "greater_area": "Tameside", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Stockport", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636841", - "lat": "53.40979", - "lon": "-2.15761", - "country": "GB", - "greater_area": "Stockport", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Macclesfield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643044", - "lat": "53.25866", - "lon": "-2.11929", - "country": "GB", - "greater_area": "Cheshire East", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Crewe", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652618", - "lat": "53.09838", - "lon": "-2.43988", - "country": "GB", - "greater_area": "Cheshire East", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Duxford, Cambridge", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650941", - "lat": "52.08333", - "lon": "0.16667", - "country": "GB", - "greater_area": "Cambridgeshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Isleworth, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646003", - "lat": "51.46667", - "lon": "-0.33333", - "country": "GB", - "greater_area": "Hounslow", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Cleator", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652715", - "lat": "54.5", - "lon": "-3.51667", - "country": "GB", - "greater_area": "Cumbria", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Hamble, Southampton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637487", - "lat": "50.86667", - "lon": "-1.31667", - "country": "GB", - "greater_area": "Hampshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bingley, Yorks.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655729", - "lat": "53.85", - "lon": "-1.83333", - "country": "GB", - "greater_area": "Bradford", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Stanmore, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637487", - "lat": "51.61667", - "lon": "-0.3", - "country": "GB", - "greater_area": "Harrow", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Oldbury, Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655603", - "lat": "52.5", - "lon": "-2.01667", - "country": "GB", - "greater_area": "Sandwell", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Welwyn Garden City", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634202", - "lat": "51.80165", - "lon": "-0.20891", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Surbiton, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636532", - "lat": "51.39221", - "lon": "-0.30383", - "country": "GB", - "greater_area": "Kingston upon Thames", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Birstall, nr Leeds", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655603", - "lat": "52.5", - "lon": "-2.01667", - "country": "GB", - "greater_area": "Sandwell", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Newcastle", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641673", - "lat": "52.95", - "lon": "-1.15", - "country": "GB", - "greater_area": "Staffordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Shipston-on-Stour", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638620", - "lat": "52.06667", - "lon": "-1.61667", - "country": "GB", - "greater_area": "Warwickshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bagington, nr Coventry", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652221", - "lat": "52.4", - "lon": "-1.48333", - "country": "GB", - "greater_area": "Warwickshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Beverley, Yorks.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656065", - "lat": "53.83333", - "lon": "-0.41667", - "country": "GB", - "greater_area": "East Riding of Yorkshire", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "St. Helens, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637433", - "lat": "53.45", - "lon": "-2.73333", - "country": "GB", - "greater_area": "St. Helens", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Leicester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644668", - "lat": "52.6386", - "lon": "-1.13169", - "country": "GB", - "greater_area": "Leicester", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Hanley, Stoke-on-Trent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637546", - "lat": "53.01667", - "lon": "-2.18333", - "country": "GB", - "greater_area": "Stoke-on-Trent", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Newark-on-Trent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641598", - "lat": "53.06667", - "lon": "-0.81667", - "country": "GB", - "greater_area": "Nottinghamshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Southall, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637347", - "lat": "51.5", - "lon": "-0.4", - "country": "GB", - "greater_area": "Ealing", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Feltham, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2649791", - "lat": "51.45", - "lon": "-0.41667", - "country": "GB", - "greater_area": "Hounslow", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Belfast", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655984", - "lat": "54.58333", - "lon": "-5.93333", - "country": "GB", - "greater_area": "Belfast", - "greater_area_type": "district", - "region": "Northern Ireland" - }, - { - "entry": "Newport, Shropshire", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641594", - "lat": "52.76667", - "lon": "-2.38333", - "country": "GB", - "greater_area": "Telford and Wrekin", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Rearsby, Leicester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639631", - "lat": "52.71667", - "lon": "-1.06667", - "country": "GB", - "greater_area": "Leicestershire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Hounslow, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2649790", - "lat": "51.46667", - "lon": "-0.35", - "country": "GB", - "greater_area": "Hounslow", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Leamington Spa.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644660", - "lat": "52.3", - "lon": "-1.53333", - "country": "GB", - "greater_area": "Warwickshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Grantham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648185", - "lat": "52.91667", - "lon": "-0.63333", - "country": "GB", - "greater_area": "Lincolnshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Taunton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636432", - "lat": "51.02111", - "lon": "-3.10472", - "country": "GB", - "greater_area": "Somerset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Melksham, Wilts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2642607", - "lat": "51.36667", - "lon": "-2.15", - "country": "GB", - "greater_area": "Wiltshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Longton, Stoke-on-Trent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644487", - "lat": "52.98333", - "lon": "-2.15", - "country": "GB", - "greater_area": "Stoke-on-Trent", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Glastonbury, Somerset", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648355", - "lat": "51.15", - "lon": "-2.71667", - "country": "GB", - "greater_area": "Somerset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Innerleithen", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646247", - "lat": "55.61667", - "lon": "-3.06667", - "country": "GB", - "greater_area": "Scottish Borders", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "St. Albans, Herts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638671", - "lat": "51.75", - "lon": "-0.33333", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Uttoxeter, Staffs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634202", - "lat": "52.9", - "lon": "-1.86667", - "country": "GB", - "greater_area": "Staffordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Luton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643339", - "lat": "51.87967", - "lon": "-0.41748", - "country": "GB", - "greater_area": "Luton", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Brooklands, nr Manchester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654710", - "lat": "53.38333", - "lon": "-2.35", - "country": "GB", - "greater_area": "Trafford", - "greater_area_type": "metropolitan borough", - "region": "England" - }, - { - "entry": "Hilden, Lisburn, N. I.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646057", - "lat": "54.51667", - "lon": "-6.05", - "country": "GB", - "greater_area": "Lisburn", - "greater_area_type": "district council area", - "region": "Northern Ireland" - }, - { - "entry": "Wibsey, Bradford", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636432", - "lat": "51.02111", - "lon": "-3.10472", - "country": "GB", - "greater_area": "Somerset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Hawick", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646885", - "lat": "55.43333", - "lon": "-2.78333", - "country": "GB", - "greater_area": "Scottish Borders", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Mitcham, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2642465", - "lat": "51.4", - "lon": "-0.16667", - "country": "GB", - "greater_area": "Merton", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Kirkcaldy, Scotland", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646003", - "lat": "56.11667", - "lon": "-3.16667", - "country": "GB", - "greater_area": "Fife", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Bath", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656173", - "lat": "51.37795", - "lon": "-2.35907", - "country": "GB", - "greater_area": "Bath and North East Somerset", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Rhondda, Glam.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639195", - "lat": "51.61667", - "lon": "-3.45", - "country": "GB", - "greater_area": "Rhondda Cynon Taf", - "greater_area_type": "principal area", - "region": "Wales" - }, - { - "entry": "Chesham, Bucks.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653224", - "lat": "51.7", - "lon": "-0.6", - "country": "GB", - "greater_area": "Buckinghamshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Slough", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638628", - "lat": "51.50949", - "lon": "-0.59541", - "country": "GB", - "greater_area": "Slough", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Enfield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647984", - "lat": "51.66361", - "lon": "-0.10667", - "country": "GB", - "greater_area": "Enfield", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Goole", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648355", - "lat": "53.70465", - "lon": "-0.87434", - "country": "GB", - "greater_area": "East Riding of Yorkshire", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Handsworth, Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647356", - "lat": "52.5", - "lon": "-1.91667", - "country": "GB", - "greater_area": "Birmingham", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Salford, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638671", - "lat": "53.48333", - "lon": "-2.26667", - "country": "GB", - "greater_area": "Salford", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Hunslet, Leeds", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "6690870", - "lat": "53.785", - "lon": "-1.532", - "country": "GB", - "greater_area": "Leeds", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Aylesbury", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656472", - "lat": "51.81667", - "lon": "-0.8", - "country": "GB", - "greater_area": "Buckinghamshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Wolverhampton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633563", - "lat": "52.58547", - "lon": "-2.12296", - "country": "GB", - "greater_area": "Wolverhampton", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Keighley, Yorks", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646007", - "lat": "53.867", - "lon": "-1.906", - "country": "GB", - "greater_area": "Bradford", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Harmondsworth", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647288", - "lat": "51.48889", - "lon": "-0.46667", - "country": "GB", - "greater_area": "Hillingdon", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Batley", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656173", - "lat": "53.70917", - "lon": "-1.62528", - "country": "GB", - "greater_area": "Kirklees", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Kilmarnock", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646003", - "lat": "55.6111", - "lon": "-4.49833", - "country": "GB", - "greater_area": "East Ayrshire", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Barnoldswick, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656284", - "lat": "53.91667", - "lon": "-2.18333", - "country": "GB", - "greater_area": "Lancashire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Wolston, Coventry", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633691", - "lat": "52.38333", - "lon": "-1.4", - "country": "GB", - "greater_area": "Coventry", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Cresswell, Stoke-on-Trent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2651819", - "lat": "53.01667", - "lon": "-2.15", - "country": "GB", - "greater_area": "Staffordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Brighton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654710", - "lat": "50.82838", - "lon": "-0.13947", - "country": "GB", - "greater_area": "Brighton and Hove", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Loughborough", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643339", - "lat": "52.76667", - "lon": "-1.2", - "country": "GB", - "greater_area": "Leicestershire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Sandycroft, Chester", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639150", - "lat": "53.21667", - "lon": "-2.98333", - "country": "GB", - "greater_area": "Flintshire", - "greater_area_type": "unitary authority", - "region": "Wales" - }, - { - "entry": "Braintree, Essex", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654938", - "lat": "51.875", - "lon": "0.55139", - "country": "GB", - "greater_area": "Essex", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Darlaston, Staffs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2651470", - "lat": "52.56667", - "lon": "-2.03333", - "country": "GB", - "greater_area": "Walsall", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Burnley", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654497", - "lat": "53.8", - "lon": "-2.23333", - "country": "GB", - "greater_area": "Lancashire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Widnes, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633782", - "lat": "53.35", - "lon": "-2.73333", - "country": "GB", - "greater_area": "Halton", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Bridge of Weir, Scotland", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654992", - "lat": "55.86667", - "lon": "-4.58333", - "country": "GB", - "greater_area": "Renfrewshire", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Weymouth", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633717", - "lat": "50.61432", - "lon": "-2.45762", - "country": "GB", - "greater_area": "Dorset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Buckhurst Hill, Essex", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654332", - "lat": "51.61667", - "lon": "0.05", - "country": "GB", - "greater_area": "Essex", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Mansfield, Notts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2642065", - "lat": "53.15", - "lon": "-1.2", - "country": "GB", - "greater_area": "Nottinghamshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Abingdon-on-Thames", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2657780", - "lat": "51.66667", - "lon": "-1.28333", - "country": "GB", - "greater_area": "Oxfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Westbury, Wilts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633858", - "lat": "51.26667", - "lon": "-2.18333", - "country": "GB", - "greater_area": "Wiltshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Witton, Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636432", - "lat": "52.51667", - "lon": "-1.88333", - "country": "GB", - "greater_area": "Birmingham", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Kendal", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2645457", - "lat": "54.32681", - "lon": "-2.74777", - "country": "GB", - "greater_area": "Cumbria", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Great Bookham, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647984", - "lat": "51.26667", - "lon": "-0.38333", - "country": "GB", - "greater_area": "Surrey", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Buxton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654496", - "lat": "53.25902", - "lon": "-1.91483", - "country": "GB", - "greater_area": "Derbyshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Wembley, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633858", - "lat": "51.55", - "lon": "-0.28333", - "country": "GB", - "greater_area": "Middlesex", - "greater_area_type": "historic county", - "region": "England" - }, - { - "entry": "Rugeley, Staffs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639195", - "lat": "52.75", - "lon": "-1.93333", - "country": "GB", - "greater_area": "Staffordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Bilston, Staffs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655654", - "lat": "52.56667", - "lon": "-2.08333", - "country": "GB", - "greater_area": "Staffordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Birkenhead", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655727", - "lat": "53.39337", - "lon": "-3.01474", - "country": "GB", - "greater_area": "Merseyside", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "New Malden, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641673", - "lat": "51.4", - "lon": "-0.25", - "country": "GB", - "greater_area": "Surrey", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Faversham, Kent", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2649791", - "lat": "51.31667", - "lon": "0.9", - "country": "GB", - "greater_area": "Kent", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Radlett, Herts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639832", - "lat": "51.68333", - "lon": "-0.31667", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Thames Ditton, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636147", - "lat": "51.38333", - "lon": "-0.33333", - "country": "GB", - "greater_area": "Surrey", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Sunbury-on-Thames", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2636540", - "lat": "51.40603", - "lon": "-0.41317", - "country": "GB", - "greater_area": "Surrey", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "York", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633352", - "lat": "53.95763", - "lon": "-1.08271", - "country": "GB", - "greater_area": "York", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Leatherhead", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644668", - "lat": "51.29667", - "lon": "-0.33056", - "country": "GB", - "greater_area": "Surrey", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Warrington", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2635167", - "lat": "53.39254", - "lon": "-2.58024", - "country": "GB", - "greater_area": "Warrington", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "West Bromwich", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633852", - "lat": "52.51868", - "lon": "-1.9945", - "country": "GB", - "greater_area": "Sandwell", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Hull", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2645425", - "lat": "53.7446", - "lon": "-0.33525", - "country": "GB", - "greater_area": "Kingston upon Hull", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Musselburgh", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2642065", - "lat": "55.93333", - "lon": "-3.06667", - "country": "GB", - "greater_area": "East Lothian", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Marston Green, nr Birmingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2643044", - "lat": "52.46667", - "lon": "-1.75", - "country": "GB", - "greater_area": "Solihull", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Walkden", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2635166", - "lat": "53.51667", - "lon": "-2.4", - "country": "GB", - "greater_area": "Salford", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Bury, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654370", - "lat": "53.6", - "lon": "-2.3", - "country": "GB", - "greater_area": "Bury", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Rochdale", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639486", - "lat": "53.61667", - "lon": "-2.15", - "country": "GB", - "greater_area": "Rochdale", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Ponders End, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641269", - "lat": "51.63333", - "lon": "-0.03333", - "country": "GB", - "greater_area": "Enfield", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Bournville", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655094", - "lat": "52.41667", - "lon": "-1.93333", - "country": "GB", - "greater_area": "Birmingham", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Todmorden, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2635600", - "lat": "53.71667", - "lon": "-2.1", - "country": "GB", - "greater_area": "Calderdale", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Letchworth, Herts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644972", - "lat": "51.98333", - "lon": "-0.23333", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Carmoney, Belfast", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655984", - "lat": "54.6", - "lon": "-5.93333", - "country": "GB", - "greater_area": "Belfast", - "greater_area_type": "district", - "region": "Northern Ireland" - }, - { - "entry": "Deepfields, nr Bilston, Staffs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653758", - "lat": "52.56667", - "lon": "-2.08333", - "country": "GB", - "greater_area": "Wolverhampton", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Hove", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646708", - "lat": "50.83333", - "lon": "-0.18333", - "country": "GB", - "greater_area": "Brighton and Hove", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Motherwell", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2642321", - "lat": "55.78333", - "lon": "-3.98333", - "country": "GB", - "greater_area": "North Lanarkshire", - "greater_area_type": "council area", - "region": "Scotland" - }, - { - "entry": "Kidderminster", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2645432", - "lat": "52.38333", - "lon": "-2.25", - "country": "GB", - "greater_area": "Worcestershire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Carlisle", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653225", - "lat": "54.88333", - "lon": "-2.93333", - "country": "GB", - "greater_area": "Cumbria", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Stapleford, Nottingham", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637343", - "lat": "52.95", - "lon": "-1.26667", - "country": "GB", - "greater_area": "Nottingham", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Coleford, Glos.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2652221", - "lat": "51.78333", - "lon": "-2.58333", - "country": "GB", - "greater_area": "Gloucestershire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Rawdon, Leeds", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639577", - "lat": "53.85", - "lon": "-1.63333", - "country": "GB", - "greater_area": "Leeds", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Richmond, Surrey", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638976", - "lat": "51.45", - "lon": "-0.3", - "country": "GB", - "greater_area": "Richmond upon Thames", - "greater_area_type": "borough", - "region": "England" - }, - { - "entry": "Higham-Ferrers, Northants.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647063", - "lat": "52.3", - "lon": "-0.6", - "country": "GB", - "greater_area": "Northamptonshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Chapman Steel Co., Sheffield.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2638077", - "lat": "53.38333", - "lon": "-1.46667", - "country": "GB", - "greater_area": "Sheffield", - "greater_area_type": "metropolitan district", - "region": "England" - }, - { - "entry": "Ilkeston", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646009", - "lat": "52.96667", - "lon": "-1.3", - "country": "GB", - "greater_area": "Derbyshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Hertford", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2647063", - "lat": "51.8", - "lon": "-0.06667", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Darlington", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2650941", - "lat": "54.53333", - "lon": "-1.56667", - "country": "GB", - "greater_area": "Darlington", - "greater_area_type": "unitary authority", - "region": "England" - }, - { - "entry": "Chesterfield", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653755", - "lat": "53.25", - "lon": "-1.41667", - "country": "GB", - "greater_area": "Derbyshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Histon, Cambridge", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646557", - "lat": "52.25", - "lon": "0.11667", - "country": "GB", - "greater_area": "Cambridgeshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Horsham, Sussex", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646557", - "lat": "51.05", - "lon": "-0.31667", - "country": "GB", - "greater_area": "West Sussex", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Castledawson, N. I.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653755", - "lat": "54.75", - "lon": "-6.5", - "country": "GB", - "greater_area": "Derry", - "greater_area_type": "county", - "region": "Northern Ireland" - }, - { - "entry": "Glastonbury", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2648110", - "lat": "51.15", - "lon": "-2.71667", - "country": "GB", - "greater_area": "Somerset", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Nuneaton", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2641430", - "lat": "52.51667", - "lon": "-1.46667", - "country": "GB", - "greater_area": "Warwickshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Lincoln", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2644487", - "lat": "53.23333", - "lon": "-0.53333", - "country": "GB", - "greater_area": "Lincolnshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Wellesbourne, Warwick", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2634491", - "lat": "52.2", - "lon": "-1.58333", - "country": "GB", - "greater_area": "Warwickshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Keighley", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646009", - "lat": "53.86667", - "lon": "-1.91667", - "country": "GB", - "greater_area": "West Yorkshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Coalville, Leics.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2653755", - "lat": "52.71667", - "lon": "-1.36667", - "country": "GB", - "greater_area": "Leicestershire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Plymouth", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2640194", - "lat": "50.37153", - "lon": "-4.14305", - "country": "GB", - "greater_area": "Devon", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Southend-on-Sea", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2637433", - "lat": "51.53782", - "lon": "0.71433", - "country": "GB", - "greater_area": "Essex", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "North Moreton, Didcot", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646009", - "lat": "51.6", - "lon": "-1.25", - "country": "GB", - "greater_area": "Oxfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Mirfield, Yorks.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2633352", - "lat": "53.66667", - "lon": "-1.7", - "country": "GB", - "greater_area": "West Yorkshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Hayes, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2646882", - "lat": "51.5", - "lon": "-0.41667", - "country": "GB", - "greater_area": "Greater London", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Romford, Essex", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639195", - "lat": "51.57708", - "lon": "0.18397", - "country": "GB", - "greater_area": "Essex", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Atherton, Lancs.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2656847", - "lat": "53.53333", - "lon": "-2.48333", - "country": "GB", - "greater_area": "Greater Manchester", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Brentford, Middx.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2654497", - "lat": "51.48333", - "lon": "-0.3", - "country": "GB", - "greater_area": "Greater London", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Berkhamsted, Herts.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2655729", - "lat": "51.75", - "lon": "-0.56667", - "country": "GB", - "greater_area": "Hertfordshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Rushden, Northants.", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "2639195", - "lat": "52.28333", - "lon": "-0.6", - "country": "GB", - "greater_area": "Northamptonshire", - "greater_area_type": "county", - "region": "England" - }, - { - "entry": "Frizinghall, Bradford", - "type": "location", - "location_type": "city", - "lang": "en", - "geonames_id": "6952621", - "lat": "53.83333", - "lon": "-1.76667", - "country": "GB", - "greater_area": "West Yorkshire", - "greater_area_type": "county", - "region": "England" - } -] diff --git a/example_use_1923.py b/example_use_1923.py new file mode 100644 index 0000000..1e81e84 --- /dev/null +++ b/example_use_1923.py @@ -0,0 +1,59 @@ +from simple_alto_parser import AltoFileParser, AltoPatternParser, AltoFileExporter, AltoNLPParser +from simple_alto_parser.dictionary_parser import AltoDictionaryParser + +"""The parser can be configured. The following options are available: + - line_type: Defines what constitutes a line for the parser. Can be either 'TextLine' or 'TextBlock'. + - file_ending: The file ending of the files to be parsed. + - meta_data: Metadata to be added to all the lines. Contains static information for all files. + Any number of key-value pairs can be added. + - file_name_structure: A regex pattern that is used to extract metadata from the file name. + - export: Options for exporting the parsed data. + """ + +parser_config = {'line_type': 'TextBlock', # TextLine, TextBlock. Defines what constitutes a line for the parser. + 'file_ending': '.xml', # The file ending of the files to be parsed. + 'meta_data': { # Metadata to be added to all the lines. Contains static information + 'title': 'Some title' + }, + 'file_name_structure': { # A regex pattern that is used to extract metadata from the file name. + 'pattern': r'(\d{4})_(\d{4})', + 'value_names': ['year', 'page']}, + 'export': { # Options for exporting the parsed data. + 'csv': { + 'print_manipulated': True, # Print the manipulated text to the csv. + 'print_filename': True, # Print the filename to the csv. + 'print_attributes': True, # Print the attributes to the csv. + 'print_parser_results': True, # Print the parser results to the csv. + 'print_file_meta_data': True, # Print the file meta data to the csv. + } + } + } + +"""The parser can be initialized with a directory path. All files in the directory with the given file ending will +be added to the list of files to be parsed. Alternatively, files can be added individually with the add_file() method. +""" +alto_parser = AltoFileParser('assets/alto/data_1923_test', parser_config=parser_config) +alto_parser.parse() + +pattern_parser = AltoPatternParser(alto_parser) +pattern_parser.find(r'^([A-Z].* & Co\., A\.-G\.)').categorize('company').remove() +pattern_parser.find(r'(([A-Z]).* (& Co\.|Ltd\.|AG.\|Cie\.|A\.-G\.|S\. A\.))').categorize('company').remove() +pattern_parser.find(r'([A-Z].* Co\.)').categorize('company').remove() +#pattern_parser.find(r'([0-9]{1,3}, [A-Z].*(strasse|platz))').categorize('address').remove() + +dictionary_parser = AltoDictionaryParser(alto_parser) +dictionary_parser.load('assets/dicts/titles.json') +dictionary_parser.load('assets/dicts/locations.json') +dictionary_parser.find(strict=False, restrict_to="location").categorize().remove() +dictionary_parser.find(restrict_to="title").categorize().remove() + +pattern_parser.find(r'^[., ].*$').remove() + +"""alto_parser.print_absent("present") +alto_parser.print_absent("company")""" + +alto_exporter = AltoFileExporter(alto_parser) +alto_exporter.save_csv('output/export.tsv', delimiter='\t') +alto_exporter.save_json('output/export.json') +alto_exporter.save_csvs('output/csv/', delimiter='\t') +alto_exporter.save_jsons('output/json/') diff --git a/simple_alto_parser/alto_file.py b/simple_alto_parser/alto_file.py index 9e60e8c..d1fa123 100644 --- a/simple_alto_parser/alto_file.py +++ b/simple_alto_parser/alto_file.py @@ -77,7 +77,7 @@ def get_csv_lines(self, add_header=True): header = self.get_csv_header() if add_header: - csv_lines = [header[0], ] + csv_lines = [header, ] else: csv_lines = [] @@ -104,7 +104,7 @@ def get_csv_lines(self, add_header=True): csv_line.append(value) if print_parser_results: - for parser_val in header[1]: + for parser_val in self.get_parser_result_keys(): csv_line.append(line.parser_data.get(parser_val, '')) if print_file_meta_data: diff --git a/simple_alto_parser/alto_file_exporter.py b/simple_alto_parser/alto_file_exporter.py index 6c8a8c9..72f9012 100644 --- a/simple_alto_parser/alto_file_exporter.py +++ b/simple_alto_parser/alto_file_exporter.py @@ -16,10 +16,9 @@ def get_combined_csv_header(self): total_header = [] for file in self.files: f_header = file.get_csv_header() - for header in f_header[0]: + for header in f_header: if header not in total_header: total_header.append(header) - print(f_header[0][3+len(f_header[1]):]) return total_header def save_csv(self, file_name, **kwargs): diff --git a/simple_alto_parser/dictionary_creator.py b/simple_alto_parser/dictionary_creator.py index 274e942..35b9cf1 100644 --- a/simple_alto_parser/dictionary_creator.py +++ b/simple_alto_parser/dictionary_creator.py @@ -1,4 +1,6 @@ import csv +import json + def from_geonames(csv_file_path): # Open Tsv @@ -35,4 +37,21 @@ def from_geonames(csv_file_path): break -from_geonames('../assets/dicts/CH.tsv') \ No newline at end of file +#from_geonames('../assets/dicts/CH.tsv') + +def from_file(filename, type='undefined'): + with open(filename, encoding='utf-8') as f: + entries = [] + for line in f: + entry = { + "label": line.strip(), + "variants": [line.strip()], + "type": type + } + entries.append(entry) + + with open(filename + '.json', 'w', encoding='utf-8') as f: + f.write(json.dumps(entries, indent=4, sort_keys=True)) + +from_file('../assets/dicts/titles.csv', type="title") + diff --git a/simple_alto_parser/dictionary_parser.py b/simple_alto_parser/dictionary_parser.py index 4147f4f..411f506 100644 --- a/simple_alto_parser/dictionary_parser.py +++ b/simple_alto_parser/dictionary_parser.py @@ -15,10 +15,23 @@ def __init__(self, parser): super().__init__(parser) def load(self, dictionary_file): - dictionary = json.load(open(dictionary_file)) + dictionary = json.load(open(dictionary_file, encoding='utf-8')) + for entry in dictionary: + if 'label' in entry: + if 'variants' not in entry: + entry['variants'] = [entry['label']] + if 'type' not in entry: + entry['type'] = 'undefined' + + entry['variants'] = [v.strip() for v in entry['variants']] + entry['variants'] = sorted(entry['variants'], key=len, reverse=True) + print(entry['variants']) + else: + raise Exception('The dictionary entry does not contain a label.') + self.dictionaries.append(dictionary) - def find(self, strict=True): + def find(self, strict=True, restrict_to=None): """Find a pattern in the text lines.""" self.clear() file_id = 0 @@ -27,14 +40,22 @@ def find(self, strict=True): for line in file.get_text_lines(): for dictionary in self.dictionaries: for entry in dictionary: - if strict: - match = entry['entry'].strip('.').lower() == line.get_text().strip().strip('.').lower() + if restrict_to is not None and entry['type'] == restrict_to: + match = None + if strict: + for v in entry['variants']: + match = v.strip('.').lower() == line.get_text().strip().strip('.').lower() + if match: + match = v + break + else: + for v in entry['variants']: + match = re.search(re.escape(v), line.get_text().strip()) + if match: + break + if match: - match = entry['entry'] - else: - match = re.search(entry['entry'], line.get_text().strip()) - if match: - self.matches.append(DictionaryMatch(file_id, line_id, match, entry)) + self.matches.append(DictionaryMatch(file_id, line_id, match, entry)) line_id += 1 file_id += 1 return self @@ -56,9 +77,7 @@ def remove(self, replacement=''): if type(match.match) == str: new_text = self.parser.get_alto_files()[match.file_id].get_text_lines()[match.line_id].get_text().replace(match.match, replacement) else: - new_text = re.sub(match.match, - replacement, - self.parser.get_alto_files()[match.fidx].get_text_lines()[match.lidx].get_text()) + new_text = self.parser.get_alto_files()[match.file_id].get_text_lines()[match.line_id].get_text().replace(match.match.group(0), replacement) self.parser.get_alto_files()[match.file_id].get_text_lines()[match.line_id].set_text(new_text) return self