simple natural language modelling in Node.js