-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(norway): classifying more addresses for norway (#171)
* Activating the DirectionalClassifier and CompoundStreetClassifier for norway, adding additional street_types and directionals for norway. * Removing street types lien and land as it crashes with other countries addresses. * Moving the custom tokens in separate file and adding unit tests. --------- Co-authored-by: mansoor.sajjad <[email protected]>
- Loading branch information
1 parent
674a3ed
commit ff961cc
Showing
6 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
resources/pelias/dictionaries/libpostal/nb/concatenated_suffixes_inseparable.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
plass|pl.|p. | ||
haugen | ||
skogen|skog | ||
gården|gård | ||
åsen | ||
haugen | ||
skogen|skog | ||
gården|gård | ||
åsen | ||
gård|gården | ||
holm|holmen | ||
haugen|Haugane | ||
krysset | ||
skogen|skog | ||
grend|grenda | ||
flat|flaten | ||
våg|vågen | ||
strand|stranda|stranden | ||
vik|vika | ||
platå | ||
stad | ||
terrasse | ||
hage|hagen | ||
øya | ||
lund|lunden | ||
holm|holmen | ||
berg|berget | ||
landa|lande|landet | ||
dal|dalen | ||
sund | ||
bakke|bakken | ||
høgda|høgde | ||
borg|borgen | ||
gard|garden|garda | ||
mark|marka | ||
voll|vollen | ||
sjø|sjøen | ||
lie | ||
sti|stien | ||
tangen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
øvre|ovre | ||
øvste|ovste | ||
nedre | ||
midtre | ||
ytre | ||
indre | ||
sør|sor|s | ||
sørre|sorre |
36 changes: 36 additions & 0 deletions
36
resources/pelias/dictionaries/libpostal/nb/street_types.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
plass | ||
haugen | ||
skogen|skog | ||
gården|gård | ||
åsen | ||
gård|gården | ||
holm|holmen | ||
haugen|Haugane | ||
krysset | ||
skogen|skog | ||
grend|grenda | ||
flat|flaten | ||
våg|vågen | ||
strand|stranda|stranden | ||
vik|vika | ||
platå | ||
stad | ||
terrasse | ||
hage|hagen|hager | ||
øya | ||
lund|lunden | ||
holm|holmen | ||
berg|berget | ||
landa|lande|landet | ||
dal|dalen | ||
sund | ||
bakke|bakken | ||
høgda|høgde | ||
borg|borgen | ||
gard|garden|garda | ||
mark|marka | ||
voll|vollen | ||
sjø|sjøen | ||
lie | ||
sti|stien | ||
tangen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const testcase = (test, common) => { | ||
let assert = common.assert(test) | ||
|
||
assert('Skredderplassen 20', [ | ||
{ street: 'Skredderplassen' }, { housenumber: '20' } | ||
]) | ||
|
||
assert('Henrik Walters plass 3', [ | ||
{ street: 'Henrik Walters plass' }, { housenumber: '3' } | ||
]) | ||
|
||
assert('Vestre Haugen 74', [ | ||
{ street: 'Vestre Haugen' }, { housenumber: '74' } | ||
]) | ||
|
||
assert('Maria Dehlis vei 15', [ | ||
{ street: 'Maria Dehlis vei' }, { housenumber: '15' } | ||
]) | ||
|
||
assert('Gamle Drammensvei 163', [ | ||
{ street: 'Gamle Drammensvei' }, { housenumber: '163' } | ||
]) | ||
|
||
assert('Grense Jakobselv veien 311', [ | ||
{ street: 'Grense Jakobselv veien' }, { housenumber: '311' } | ||
]) | ||
|
||
assert('Epleskogen 39A', [ | ||
{ street: 'Epleskogen' }, { housenumber: '39A' } | ||
]) | ||
|
||
assert('Øvste Skogen 121', [ | ||
{ street: 'Øvste Skogen' }, { housenumber: '121' } | ||
]) | ||
|
||
assert('Tindvegen nedre 44B', [ | ||
{ street: 'Tindvegen nedre' }, { housenumber: '44B' } | ||
]) | ||
} | ||
|
||
module.exports.all = (tape, common) => { | ||
function test (name, testFunction) { | ||
return tape(`address AUS: ${name}`, testFunction) | ||
} | ||
|
||
testcase(test, common) | ||
} |