Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary updates #22

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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