-
Notifications
You must be signed in to change notification settings - Fork 0
/
spellings.ts
45 lines (37 loc) · 1.17 KB
/
spellings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair
/* eslint-disable @cspell/spellchecker */
import cartesianProduct from 'just-cartesian-product'
/**
* See
* https://www.noslangues-ourlanguages.gc.ca/en/writing-tips-plus/sault-ste.-marie-soo-saultite
*/
export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie'
/**
* See
* https://www.canadapost-postescanada.ca/cpc/en/support/kb/business/address-accuracy/municipality-abbreviations-ontario
*/
export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE'
const wordSpellings = {
sault: ['s', 'sault', 'saulte', 'soo'],
ste: ['s', 'st', 'ste', 'saint', 'sainte'],
marie: ['m', 'mari', 'marie', 'mary']
}
const product = cartesianProduct([
wordSpellings.sault,
wordSpellings.ste,
wordSpellings.marie
])
// Generate combinations
const lowerCaseSaultSteMarieSpellingsList = product.map((combination) => {
return combination.join('')
})
// Add specific misspellings and slang names
lowerCaseSaultSteMarieSpellingsList.push(
'saltstemarie',
'salutstemarie',
'thesault',
'thesoo'
)
export const lowerCaseSaultSteMarieSpellings = new Set(
lowerCaseSaultSteMarieSpellingsList
)