Commit Graph

596 Commits

Author SHA1 Message Date
Al
c47762b91c [addresses] Unit/apartment number generation 2016-07-21 17:04:57 -04:00
Al
ca68391ea6 [addresses] sample positive floors 2016-07-21 17:04:57 -04:00
Al
9f652591ad [mv] Moving sampling to math.sampling 2016-07-21 17:04:57 -04:00
Al
32b6217aa8 [addresses] Conjunction can be subclassed 2016-07-21 17:04:57 -04:00
Al
535453f77d [addresses] Adding ability to randomly append relative/cardinal directions 2016-07-21 17:04:57 -04:00
Al
f026e8a764 [addresses] Adding base class for numeric phrases (appended to a number using numeric/numeric_affix), using probability 1.0 if only one of numeric/numeric_affix/ordinal is specified 2016-07-21 17:04:57 -04:00
Al
efc40c5698 [fix] polygons 2016-07-21 17:04:57 -04:00
Al
c7ea5d9637 [fix] typo 2016-07-21 17:04:57 -04:00
Al
0a80ec7129 [polygons] Adding __iter__ and __len__ to polygon index and keeping track of the number of polygons for iteration 2016-07-21 17:04:57 -04:00
Al
f7764b70cd [addresses] implementing null_probability (raw number, no phrase), orindal genders, and direction_probability 2016-07-21 17:04:57 -04:00
Al
22687323c2 [numbers] suffixed_number 2016-07-21 17:04:57 -04:00
Al
6d4e54cd7a [dictionaries] making entrances/postcodes plural for consistency 2016-07-21 17:04:57 -04:00
Al
410eb0006a [dictionaries] Moving intersections to cross streets 2016-07-21 17:04:57 -04:00
Al
2f9a58f37b [expansion] Add postcode dictionary to gazetteer types 2016-07-21 17:04:57 -04:00
Al
b5386eb601 [addresses] generator for floor numbers as well as special aliases like basement, mezzanine, etc. using the address configs 2016-07-21 17:04:57 -04:00
Al
e1f1e34dca [expansion] Modifying the Python gazetteers to use new dictionaries API 2016-07-21 17:04:57 -04:00
Al
80089099e9 [expansion] Adding number and intersections to dictionary types 2016-07-21 17:04:57 -04:00
Al
3d3aacae67 [addresses] Adding abbreviations as a separate module so it can be used with multiple data sets 2016-07-21 17:04:57 -04:00
Al
317d3aa9ed [addresses] PO Box phrase generator 2016-07-21 17:04:57 -04:00
Al
9c4348a990 [addresses] conjunction class for building phrases like "5th and 6th" or "Units 1 & 2" across languages using the address configs 2016-07-21 17:04:57 -04:00
Al
d136fb7576 [addresses] base class for numbered components (floors, units, house numbers in some languages/countries). Can generate many variants of a number (e.g. Floor 2, 2nd Floor, Floor #2, Floor No. 2, etc.) 2016-07-21 17:04:57 -04:00
Al
14c89e6895 [addresses] utilities for sampling from an arbitrary discrete distribution, building cumulative distributions, and sampling from a Zipfian distribution which seems to be a reasonable way of generating plausible apartment/floor numbers when the height/number of units is unknown. Picking a letter uniformly at random means P('Unit A') == P('Unit Z') when 'A' should be much more likely. Sampling from a Zipfian gets the desired effect in situations where address components are numbered by "counting from 0/1/A" while still allowing for a long tail 2016-07-21 17:04:57 -04:00
Al
dcabdf7c0b [addresses] address config class for general sampling of forms specified in the address configs (default/alternatives to choose a phrase, canonical/abbreviated/sample to choose an abbreviation or surface form for that phrase) 2016-07-21 17:04:57 -04:00
Al
9a0ea19d02 [polygons] Persistent polygons for neighborhoods index as well, cache size at 100k 2016-07-21 17:04:57 -04:00
Al
90142e8559 [polygons] neighborhoods repo has the correct polygons for NYC, removing the pediacities version 2016-07-21 17:04:57 -04:00
Al
c570bb7aef [fix] priorities in neighborhood index 2016-07-21 17:04:57 -04:00
Al
e87c216241 [fix] var name 2016-07-21 17:04:57 -04:00
Al
ab1a8d4416 [fix] Fixes to Zetashapes reverse geocoder 2016-07-21 17:04:57 -04:00
Al
a93f110112 [fix] moving methods 2016-07-21 17:04:57 -04:00
Al
efd167323b [polygons/neighborhoods] refactoring Zetashapes download, adding in PediaCities polygons for NYC neighborhoods 2016-07-21 17:04:57 -04:00
Al
333bd7ef45 [polygons] refactoring methods for getting cached/non-cached polygons 2016-07-21 17:04:57 -04:00
Al
e4ff4a28b1 [polygons] Quattroshapes neighborhoods use regular in-memory polygons 2016-07-21 17:04:57 -04:00
Al
9dd5d5c210 [dictionaries] encapsulating reading address dictionaries so it's easy to implement sampling for the address training data 2016-07-21 17:04:57 -04:00
Al
23525df39d [numex] Nicer API for ordinal suffixes 2016-07-21 17:04:57 -04:00
Al
0f0af1f295 [osm/polygons] Adding properties in building polygons 2016-07-21 17:04:57 -04:00
Al
e24306701f [numex] Moving numex files to YAML as well 2016-07-21 17:04:57 -04:00
Al
76fc337d0e [osm/polygons] add building:part to building polygons 2016-07-21 17:04:57 -04:00
Al
72ee2e00ae [osm] Moving OSM boundaries to YAML files instead of JSON for consistency 2016-07-21 17:04:57 -04:00
Al
6a03b0376c [osm/polygons] Using greater simplify tolerance 2016-07-21 17:04:57 -04:00
Al
ae62471d32 [fix] simplify_polygons in building geocoder, and adding caching back to OSM admin polygons as it's faster when taking into account startup time. Also adding a few properties to buildings and landuse polygons 2016-07-21 17:04:57 -04:00
Al
1f52f8ddcc [osm/polygons] Same check for closed ways as for relations in OSM polygon readers 2016-07-21 17:04:57 -04:00
Al
26ada5cdbb [osm/polygons] From benchmarking it seems to make sense to keep OSM polygons in memory after all 2016-07-21 17:04:57 -04:00
Al
f76a78120d [fix] properties/polygon key split 2016-07-21 17:04:57 -04:00
Al
d460e2abe9 [osm/polygons] Trying persistent polygons again on OSM/Quattroshapes to test the new settings 2016-07-21 17:04:57 -04:00
Al
171a85bdff [osm/polygons] Storing polygon JSON under a different key so it doesn't have to be read from disk after a successful cache matched point-in-polygon test just to retrieve the properties 2016-07-21 17:04:57 -04:00
Al
67a3ee8e2a [fix] var name 2016-07-21 17:04:57 -04:00
Al
58f075f2ea [fix] classmethod for loading polygons 2016-07-21 17:04:57 -04:00
Al
9755d2cee9 [osm/polygons] Keep OSM/Quattroshapes admin polygons in memory as there are fewer of them and they are large 2016-07-21 17:04:57 -04:00
Al
f6b88ba456 [fix] double prep 2016-07-21 17:04:57 -04:00
Al
941ab39a6a [fix] return_all in polygon index 2016-07-21 17:04:57 -04:00