Skip to content

Commit 152bad5

Browse files
authored
feat(dictionaries): dictionary updates (#21)
1 parent e1e67cc commit 152bad5

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

classifier/WhosOnFirstClassifier.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class WhosOnFirstClassifier extends PhraseClassifier {
3434
this.tokens = {}
3535
Object.keys(placetypes).forEach(placetype => {
3636
this.tokens[placetype] = new Set()
37-
whosonfirst.load(this.tokens[placetype], [placetype], placetypes[placetype].files)
37+
whosonfirst.load(this.tokens[placetype], [placetype], placetypes[placetype].files, {
38+
minlength: 2
39+
})
3840

3941
// general blacklist
4042
this.tokens[placetype].delete('north')
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# abbrviation for 'chaussee' conflicts with Swiss countrycode
2+
!ch
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# conflicts with US state abbreviation
2+
!ca

resources/pelias/dictionaries/whosonfirst/locality/name:eng_x_preferred.txt

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,56 @@
33
nyc
44
sf
55
# remove problematic locality names
6-
!texas
6+
!italy
7+
!college
8+
!university
9+
# remove any localities which share a name with a US state
10+
!alabama
11+
!alaska
12+
!arizona
13+
!arkansas
714
!california
8-
!italy
15+
!colorado
16+
!connecticut
17+
!delaware
18+
!florida
19+
!georgia
20+
!hawaii
21+
!idaho
22+
!illinois
23+
!indiana
24+
!iowa
25+
!kansas
26+
!kentucky
27+
!louisiana
28+
!maine
29+
!maryland
30+
!massachusetts
31+
!michigan
32+
!minnesota
33+
!mississippi
34+
!missouri
35+
!montana
36+
!nebraska
37+
!nevada
38+
!new hampshire
39+
!new jersey
40+
!new mexico
41+
#!new york
42+
!north carolina
43+
!north dakota
44+
!ohio
45+
!oklahoma
46+
!oregon
47+
!pennsylvania rhode island
48+
!south carolina
49+
!south dakota
50+
!tennessee
51+
!texas
52+
!utah
53+
!vermont
54+
!virginia
55+
#!washington
56+
!west virginia
57+
!wisconsin
58+
!wyoming

0 commit comments

Comments
 (0)