Gram-cracker

View project onGitHub

gram-cracker

A node.js n-gram extraction plugin.

Build Status

Dependencies

The plugin is dependent upon q and Underscore.

Unit tests are dependent upon Mocha and Should.

Usage

var gram_cracker = require("gram-cracker");

var gram = new gram_cracker();
gram.addDocuments([
        "The quick brown fox jumps over the lazy dog.",
        "Being bounced around quickly annoyed the disheveled taxi drivers."
    ])
    .then(function(docs) {
        var stopWords = ["a", "the"];

        gram.extract(2, stopWords).then(function(ngrams) {

            console.log(ngrams);
        });                
    });

Authors and Contributors

Jason Fuehner (@jfuehner)