nltk
v0.0.1
Published
nl toolkit in js
Downloads
664
Maintainers
Readme
nltk
n-gram
coffee> nltk = require 'nltk'
{ ngram: [Function: ngram] }
coffee> nltk.ngram
[Function: ngram]
coffee> nltk.ngram 3
undefined
coffee> new nltk.ngram 3
{ enum: [Function], sim: [Function] }
coffee> Tri = new nltk.ngram 3
{ enum: [Function], sim: [Function] }
coffee> Tri.enum 'ABCDEFG'
[ 'ABC', 'BCD', 'CDE', 'DEF', 'EFG' ]
coffee> Tri.sim 'ABCDEFG', 'EFGABC'
0.4472135954999579