Skip to content

Instantly share code, notes, and snippets.

@fcamblor
Last active July 26, 2021 12:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
dict-fr.json

How I generated this file :

const fcontent = fs.readFileSync('./dela-fr-public.dic', 'utf16le')
const words = [...new Set(fcontent.split('\n').flatMap(line => line.split('.')[0].split(",").filter(v => !!v)))];
const singleWords = words.filter(w => w.indexOf(" ") === -1);
fs.writeFileSync("./words.json", JSON.stringify(words), 'utf16le')
fs.writeFileSync("./single-words.json", JSON.stringify(singleWords), 'utf16le')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment