-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtry.js
45 lines (40 loc) · 1.19 KB
/
try.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const { Pronounceable } = require('./dist/index');
// const words = require('an-array-of-english-words');
// const fs = require('fs');
const pronounceable = new Pronounceable();
// const tuples = pronounceable.trainTuples(words);
// fs.writeFileSync('./src/data/tuples.json', JSON.stringify(tuples));
// const triples = pronounceable.trainTriples(words);
// fs.writeFileSync('./src/data/triples.json', JSON.stringify(triples));
// console.log(pronounceable.trainTuples(words));
async function test() {
// const words = ['peonies', 'sshh'];
// const words = ['hello', 'electraluxe', 'electrastic', 'ElectraBlast', 'GraphConsulting', 'PathfinderGroup'];
const words = [
'Smart',
'smart',
'SmarX',
'Churro',
'TechTok',
'Gadgopia',
'Namergize',
'Google',
'Amazon',
'Flipkart',
'ElectraNyx',
'ElectraLuxe',
'ElectraOptic',
'ElectraScepter',
'ElementalElectronics',
'ServiceConsultService',
'ServiceConsultSolutions',
'SolutionSolveServeServeServe',
'SolutionProServeSolutionServe',
'ServeSupportSolutionServeServe',
'in',
];
for (const word of words) {
console.log({ word, score: pronounceable.score(word) });
}
}
test();