Skip to content

Commit 68ca511

Browse files
committed
feat(street): Add some cases for street_name
Remove Paris from regions and add cité in street_types. Paris is always used as a locality
1 parent 8c2d180 commit 68ca511

4 files changed

Lines changed: 53 additions & 0 deletions

File tree

classifier/scheme/street_name.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ module.exports = [
3333
}
3434
]
3535
},
36+
{
37+
// du 4 septembre
38+
confidence: 0.5,
39+
Class: StreetNameClassification,
40+
scheme: [
41+
{
42+
is: ['StopWordClassification']
43+
},
44+
{
45+
is: ['NumericClassification'],
46+
not: ['PostcodeClassification']
47+
},
48+
{
49+
is: ['AlphaClassification'],
50+
not: ['StreetClassification', 'IntersectionClassification', 'LocalityClassification']
51+
}
52+
]
53+
},
3654
{
3755
// dos Fiéis de Deus
3856
confidence: 0.5,
@@ -47,5 +65,20 @@ module.exports = [
4765
not: ['StreetClassification', 'IntersectionClassification']
4866
}
4967
]
68+
},
69+
{
70+
// rue des petits carreaux
71+
confidence: 0.5,
72+
Class: StreetNameClassification,
73+
scheme: [
74+
{
75+
is: ['StreetNameClassification'],
76+
not: ['StreetClassification', 'IntersectionClassification']
77+
},
78+
{
79+
is: ['AlphaClassification'],
80+
not: ['StreetClassification', 'IntersectionClassification']
81+
}
82+
]
5083
}
5184
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cité|cite
2+
cités|cites
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This is not used as region
2+
!paris

test/address.fra.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ const testcase = (test, common) => {
6363
assert('Rue Jean Baptiste Clément', [
6464
{ street: 'Rue Jean Baptiste Clément' }
6565
], true)
66+
67+
assert('16 Rue Des Petits Carreaux', [
68+
{ housenumber: '16' }, { street: 'Rue Des Petits Carreaux' }
69+
], true)
70+
71+
assert('16 Rue Des Petits Carreaux Paris', [
72+
{ housenumber: '16' }, { street: 'Rue Des Petits Carreaux' }, { locality: 'Paris' }
73+
], true)
74+
75+
assert('4 Cité Du Cardinal Lemoine 75005', [
76+
{ housenumber: '4' }, { street: 'Cité Du Cardinal Lemoine' }, { postcode: '75005' }
77+
], true)
78+
79+
assert('32 Rue Du 4 Septembre', [
80+
{ housenumber: '32' }, { street: 'Rue Du 4 Septembre' }
81+
], true)
6682
}
6783

6884
module.exports.all = (tape, common) => {

0 commit comments

Comments
 (0)