Removed names from dictionary.

This commit is contained in:
ThePendulum 2024-06-18 21:40:38 +02:00
parent 5aa5b1852a
commit 34b3269d54
3 changed files with 6 additions and 9996 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,9 @@ const words = require('./words.json');
const dictionary = require('./dictionary_old.json'); const dictionary = require('./dictionary_old.json');
async function init() { async function init() {
const definitions = Object.fromEntries(words.map((word) => { const notNameWords = words.filter((word) => word.charAt(0) === word.charAt(0).toLowerCase()); // don't include names for places, products, people, etc.
const definitions = Object.fromEntries(notNameWords.map((word) => {
const normalizedWord = word.normalize('NFD').replace(/\p{Diacritic}/ug, '').toLowerCase().trim(); const normalizedWord = word.normalize('NFD').replace(/\p{Diacritic}/ug, '').toLowerCase().trim();
const definition = dictionary[normalizedWord]; const definition = dictionary[normalizedWord];
const singular = normalizedWord.replace(/s$/, ''); const singular = normalizedWord.replace(/s$/, '');

View File

@ -73651,6 +73651,7 @@
"snubbed", "snubbed",
"snubbing", "snubbing",
"snubs", "snubs",
"snuck",
"snuff", "snuff",
"snuffbox", "snuffbox",
"snuffboxes", "snuffboxes",