Closed silentrob closed 10 years ago
Hey @silentrob, can you give more hints? Just writing your code here will be great.
I just copied/paste the demo from the readme.. Ill give you a complete gist. node v0.10.24, Mountain:stanfordnlp robellis$ java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
It happens with any option.
Unfortunately, I couldn't meet the Uncaught TypeError.
But I updated to use coffee-script 1.7.1
from 1.6.x and StanfordNLP 3.3.1
from 3.3.0 and stanford-simple-nlp
was bumped to version 0.2.1
.
You may see a more informed error now.
So, follow below steps.
jar/
directory.Thanks.
Awesome. I will try it again.
This is the trace now.
/Users/robellis/projects/stanfordnlp/node_modules/stanford-simple-nlp/lib/StanfordSimpleNLP.coffee:80 return callback(new Error('Load a pipeline first.')); ^ TypeError: undefined is not a function at StanfordSimpleNLP.process (/Users/robellis/projects/stanfordnlp/node_modules/stanford-simple-nlp/lib/StanfordSimpleNLP.coffee:69:12) at /Users/robellis/projects/stanfordnlp/server.js:8:21 at /Users/robellis/projects/stanfordnlp/node_modules/stanford-simple-nlp/lib/StanfordSimpleNLP.coffee:54:18
I should be using the process method the same was as your test. process("...", function(err, res){});
Okay I got it. You can't just call pares you need to call tokenize, ssplit and pos first. Java was returning an error and I think it was getting though and unsetting the callback.
Oh, I see. now then I can reproduce the problem. I'll fix it properly, thanks @silentrob!
modified unclear examples - 8fef978c5e581f46045ce52f19314fc0d0976cb0
Just followed the instructions and Im seeing, but I don't have a line 2766 (Love CoffeeScript)
stanford-simple-nlp/lib/StanfordSimpleNLP.coffee:2766: Uncaught TypeError: undefined is not a function