-
Notifications
You must be signed in to change notification settings - Fork 0
/
dna.js
41 lines (30 loc) · 949 Bytes
/
dna.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
//call to build data for data.txt file
//this function has been left
//for building customized data sets
function vData(){
var cns = 'bcdfghjklmnpqrstvwxz'.split('');
var vls = 'aeiouy'.split('');
var a = [];
//start the engine
for(var vi=0;vi<vls.length;vi++){
for(var ci=0;ci<cns.length;ci++){
for(var cii=0;cii<cns.length;cii++){
// Vowel - Const - Const
a = a.concat(vls[vi] + cns[ci] + cns[cii]);
// Const - Vowel - Const
a = a.concat(cns[ci] + vls[vi] + cns[cii]);
// Const - Const - Vowel
a = a.concat(cns[ci] + cns[cii]+ vls[vi]);
}
// Const - Vowel
a = a.concat(cns[ci] + vls[vi]);
// Vowel - Const
a = a.concat(vls[vi] + cns[ci]);
}
for(var vii=0;vii<vls.length;vii++){
// Vowel - Vowel
a = a.concat(vls[vi] + vls[vii]);
}
}
return a;
}