1
0
Fork 0

language processing scripts improvements

* remove-foreign-words script now supports blacklist and whitelist mode

  * fixed .domain sorting

  * clean'n'sort script
This commit is contained in:
sspanak 2024-02-05 21:33:39 +02:00 committed by Dimo Karaivanov
parent 071a4c29c2
commit ef2f92c0ac
4 changed files with 71 additions and 46 deletions

View file

@ -66,7 +66,7 @@ async function readDefinition(fileName) {
}
let lettersPattern = /^\s+-\s*\[([^\]]+)/;
let letterWeights = new Map([["'", 1], ['-', 1], ['"', 1]]);
let letterWeights = new Map([["'", 1], ['-', 1], ['"', 1], ['.', 1]]);
let key = 2;
for await (const line of createInterface({ input: createReadStream(fileName) })) {