Initial tests for False Positives
This commit is contained in:
parent
3722ab2af3
commit
f00516ce2e
5 changed files with 94342 additions and 1 deletions
|
|
@ -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}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue