-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtest.js
More file actions
36 lines (29 loc) · 676 Bytes
/
test.js
File metadata and controls
36 lines (29 loc) · 676 Bytes
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
var cmarkov = require('./cmarkov');
var bot = new cmarkov({
name: 'trump',
depth: [1,5],
lowpri: 3,
weight: 1,
depthWeight: 1,
certainty: 0.1,
pos: true,
debug: false
});
//bot.test();
bot.read("training-data/trump.txt", function() {
bot.readPOS("training-data/trump.txt", function() {
bot.generate("I would like to talk today about", 200, function(str) {
console.log(str);
});
});
});
/*
var start = new Date().getTime();
bot.generate("I would like to talk today about", 200, function(str) {
//console.trace();
console.log(str);
var end = new Date().getTime();
var total = (end-start)/(1000*60);
console.log("Time: ",total);
});
*/