Skip to content

Instantly share code, notes, and snippets.

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
What would you like to do?

How I generated this file :

const fcontent = fs.readFileSync('./dela-fr-public.dic', 'utf16le')
const words = [ 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