Initial tests for False Positives

This commit is contained in:
Konstantin Mamalakis 2018-03-12 20:08:45 +02:00 committed by Josh Harvey
parent 3722ab2af3
commit f00516ce2e
5 changed files with 94342 additions and 1 deletions

View file

@ -30,6 +30,10 @@ const partNames = new Map([
[NICKNAME, 'nickname']
])
const filteredWords = [
'al'
]
// group-id to type-id
function processMasterNamePartGroup (groupNode) {
@ -68,7 +72,17 @@ const processAlias = _.curry((groupTypes, aliasNode) => {
const parts = _.map(getNamePart, namePartNodes)
const fullName = nameUtils.makeFullName(parts)
const words = nameUtils.makeWords(fullName)
const words = _.flow(
nameUtils.makeWords,
_.reject(_.flow(
_.get('value'),
word => filteredWords.includes(word)
))
)(fullName)
// if (words.length < 2) {
// console.log(JSON.stringify(words))
// }
return {id, parts, fullName, words}
})