Skip to content

Commit

Permalink
feat(dictionaries): dictionary updates
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed May 16, 2019
1 parent e1e67cc commit 7c21324
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
4 changes: 3 additions & 1 deletion classifier/WhosOnFirstClassifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class WhosOnFirstClassifier extends PhraseClassifier {
this.tokens = {}
Object.keys(placetypes).forEach(placetype => {
this.tokens[placetype] = new Set()
whosonfirst.load(this.tokens[placetype], [placetype], placetypes[placetype].files)
whosonfirst.load(this.tokens[placetype], [placetype], placetypes[placetype].files, {
minlength: 2
})

// general blacklist
this.tokens[placetype].delete('north')
Expand Down
2 changes: 2 additions & 0 deletions resources/pelias/dictionaries/libpostal/de/street_types.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# abbrviation for 'chaussee' conflicts with Swiss countrycode
!ch
2 changes: 2 additions & 0 deletions resources/pelias/dictionaries/libpostal/es/street_types.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# conflicts with US state abbreviation
!ca
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,56 @@
nyc
sf
# remove problematic locality names
!texas
!italy
!college
!university
# remove any localities which share a name with a US state
!alabama
!alaska
!arizona
!arkansas
!california
!italy
!colorado
!connecticut
!delaware
!florida
!georgia
!hawaii
!idaho
!illinois
!indiana
!iowa
!kansas
!kentucky
!louisiana
!maine
!maryland
!massachusetts
!michigan
!minnesota
!mississippi
!missouri
!montana
!nebraska
!nevada
!new hampshire
!new jersey
!new mexico
#!new york
!north carolina
!north dakota
!ohio
!oklahoma
!oregon
!pennsylvania rhode island
!south carolina
!south dakota
!tennessee
!texas
!utah
!vermont
!virginia
#!washington
!west virginia
!wisconsin
!wyoming

0 comments on commit 7c21324

Please sign in to comment.