Skip to content

Instantly share code, notes, and snippets.

@silentrob
Created April 3, 2014 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silentrob/9945896 to your computer and use it in GitHub Desktop.
Save silentrob/9945896 to your computer and use it in GitHub Desktop.
var StanfordSimpleNLP = require('stanford-simple-nlp').StanfordSimpleNLP;
var options = {
annotators: ['parse']
};
var stanfordSimpleNLP = new StanfordSimpleNLP(options, function(err) {
stanfordSimpleNLP.process('This is so good.', function(err, result) {
if (err) console.log(err);
console.log(result)
});
});
// Output
Mountain:stanfordnlp robellis$ node server.js
Adding annotator parse
Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ... done [2.7 sec].
/Users/robellis/projects/stanfordnlp/node_modules/stanford-simple-nlp/lib/StanfordSimpleNLP.coffee:2766: Uncaught TypeError: undefined is not a function
Mountain:stanfordnlp robellis$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment