Name-part matching now combines Jaro and Double Metaphone scores

This commit is contained in:
Konstantin Mamalakis 2018-03-13 22:07:44 +02:00 committed by Josh Harvey
parent f00516ce2e
commit 793db0f449
5 changed files with 54 additions and 78 deletions

View file

@ -31,7 +31,7 @@ const partNames = new Map([
])
const filteredWords = [
'al'
// 'al'
]
// group-id to type-id
@ -187,7 +187,10 @@ const producePhoneticMap = _.flow(
mapAliases(getPhoneticEntries),
_.flatten,
_.groupBy(_.get('phonetic')),
_.mapValues(_.map(_.pick(['value', 'aliasId']))),
_.mapValues(_.flow(
_.map(_.get('aliasId')),
_.uniq
)),
_.toPairs,
entries => new Map(entries)
)