Skip to content

Commit

Permalink
reorganize
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Mar 8, 2024
1 parent 542292b commit aecead7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
36 changes: 19 additions & 17 deletions spellings.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import cartesianProduct from 'just-cartesian-product';
export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie';
export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE';
const saultSpellings = [
'ault',
'dault',
's',
'salt',
'salut',
'sault',
'saulte',
'soo',
'sult'
];
const steSpellings = ['s', 'st', 'ste', 'saint', 'sainte'];
const marieSpellings = ['m', 'mare', 'marei', 'maire', 'marie', 'mary'];
const wordSpellings = {
sault: [
'ault',
'dault',
's',
'salt',
'salut',
'sault',
'saulte',
'soo',
'sult'
],
ste: ['s', 'st', 'ste', 'saint', 'sainte'],
marie: ['m', 'mare', 'marei', 'maire', 'marie', 'mary']
};
const lowerCaseSaultSteMarieSpellingsList = cartesianProduct([
saultSpellings,
steSpellings,
marieSpellings
wordSpellings.sault,
wordSpellings.ste,
wordSpellings.marie
]).map((combination) => {
return combination.join(' ');
});
lowerCaseSaultSteMarieSpellingsList.push('sault stemarie', 'saultstemarie', 'ssm', 'ssmarie');
lowerCaseSaultSteMarieSpellingsList.push('the sault', 'the soo', 'sault stemarie', 'saultstemarie', 'ssm', 'ssmarie');
export const lowerCaseSaultSteMarieSpellings = new Set(lowerCaseSaultSteMarieSpellingsList);
38 changes: 20 additions & 18 deletions spellings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,33 @@ export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie'

export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE'

const saultSpellings = [
'ault',
'dault',
's',
'salt',
'salut',
'sault',
'saulte',
'soo',
'sult'
]

const steSpellings = ['s', 'st', 'ste', 'saint', 'sainte']

const marieSpellings = ['m', 'mare', 'marei', 'maire', 'marie', 'mary']
const wordSpellings = {
sault: [
'ault',
'dault',
's',
'salt',
'salut',
'sault',
'saulte',
'soo',
'sult'
],
ste: ['s', 'st', 'ste', 'saint', 'sainte'],
marie: ['m', 'mare', 'marei', 'maire', 'marie', 'mary']
}

const lowerCaseSaultSteMarieSpellingsList = cartesianProduct([
saultSpellings,
steSpellings,
marieSpellings
wordSpellings.sault,
wordSpellings.ste,
wordSpellings.marie
]).map((combination) => {
return combination.join(' ')
})

lowerCaseSaultSteMarieSpellingsList.push(
'the sault',
'the soo',
'sault stemarie',
'saultstemarie',
'ssm',
Expand Down

0 comments on commit aecead7

Please sign in to comment.