couchrest_model/views/markov/chain-map.js
2008-06-02 09:36:48 -07:00

2 lines
No EOL
197 B
JavaScript

function(doc){var words=doc.text.split(/\W/).filter(function(w){return w.length>0}).map(function(w){return w.toLowerCase()});for(var i=0,l=words.length;i<l;i++){emit(words.slice(i,4),doc.title);}}