Skip to content

Instantly share code, notes, and snippets.

["c","w","b","m","f","g","l","d","u","y",
"n","h","r","o","i","s","e","t","a",
"v","q","j","k","x","z","p"]
{
i: { // most frequent
freq: 104530,
t: 13167,
s: 14064,
v: 2299,
n: 30238,
o: 4435,
f: 2176,
e: 3570,
var fs = require("fs");
var text;
var markovChain = {};
var file = "sampleText.txt";
start();
function start() {
fs.readFile(file, "utf8", function(err, data) {
if (err) throw err;
var text = data
It is a truth universally acknowledged, that a single man in possession
of a good fortune, must be in want of a wife.
However little known the feelings or views of such a man may be on his
first entering a neighbourhood, this truth is so well fixed in the minds
of the surrounding families, that he is considered the rightful property
of some one or other of their daughters.
“My dear Mr. Bennet,” said his lady to him one day, “have you heard that
Netherfield Park is let at last?”
//key is Q89RW8U7CR3LC2AL
var ctx = document.getElementById("myChart").getContext("2d");
var myChart = new Chart(ctx, {
type: "line",
data: {
labels: [],
datasets: [
{
label: "",
console.log("helloworld");