Skip to content

Commit

Permalink
feat(dictionaries): dictionary updates (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink authored May 16, 2019
1 parent 152bad5 commit 93cd613
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
3 changes: 0 additions & 3 deletions classifier/CompoundStreetClassifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ class CompoundStreetClassifier extends WordClassifier {
// this removes suffixes such as 'r.' which can be ambiguous
minlength: 3
})

// whitelist
this.suffixes.park = true
}

each (span) {
Expand Down
2 changes: 1 addition & 1 deletion classifier/CompoundStreetClassifier.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ module.exports.tests.contains_numerals = (test) => {
module.exports.tests.german_compound = (test) => {
let valid = [
'teststraße', 'teststrasse', 'teststr.',
'teststr', 'grolmanstr',
'testallee',
'testweg',
'testplatz',
'testpl.'
]

let invalid = [
'teststr',
'testal',
'testw', 'testw.'
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
str
park
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sf
!italy
!college
!university
!airport
!deli
# remove any localities which share a name with a US state
!alabama
!alaska
Expand Down
8 changes: 8 additions & 0 deletions test/intersection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ const testcase = (test, common) => {
[{ street: 'SW 6th' }, { street: 'Pine' }]
])

// Should not detect this as an intersection
// assert('University of Hawaii at Hilo', [
// [{ street: 'SW 6th' }, { street: 'Pine' }]
// ])
// assert('national air and space museum', [
// [{ street: 'SW 6th' }, { street: 'Pine' }]
// ])

// Trimet syntax
// assert('9,Lambert', [
// [{ street: '9' }, { street: 'Lambert' }]
Expand Down

0 comments on commit 93cd613

Please sign in to comment.