Comments (5)
Sorry to hear, @latkinso42.
Could you write your code here? Let me inspect the problem please.
from node-stanford-simple-nlp.
So it seems this was a java CLASSPATH issue. There was a difference in the errors from the Async technique and the Sync technique, but this is most likely due to the loadPipeline requirement. Both are working now, for me.
My node app.js employs a typical routes.js for get and post. The callback for the post calls a handler which uses either the async or sync method as below. The post callback generally renders the output from the results of the parser and the params contain the text query:
var StanfordSimpleNLP = require('../../lib/StanfordSimpleNLP');
// ASYNC
exports.parsePhrase = function(params, callback) {
var ssnlp=new StanfordSimpleNLP( function(err) {
ssnlp.process(params.tquery, callback);
});
}
// SYNC
exports.parsePhrase = function(params, callback) {
var stanfordSimpleNLP = new StanfordSimpleNLP(null, callback);
stanfordSimpleNLP.loadPipelineSync();
stanfordSimpleNLP.process(params.tquery, function(err, result) {
callback(err, result);});
}
Every thing works either way!
Thanks!
from node-stanford-simple-nlp.
Good job!
I know that the setting java & node-java is not easy in some environments.
from node-stanford-simple-nlp.
I'm having a problem using the node wrapper.
When I use this:
var stanfordSimpleNLP = new StanfordSimpleNLP.StanfordSimpleNLP(function(err, callback) {
stanfordSimpleNLP.process('This is so good.', function(err, result) {
console.log(err, result);
if (err){
return err;
}
console.log(result);
});
I get the 'load a pipeline first' error.
When I use this:
var stanfordSimpleNLP = new StanfordSimpleNLP(function(err){
// same code as above
I get the object is not a function TypeError.
I'm trying to find a way to make this work but I can't quite understand where to go from here.
from node-stanford-simple-nlp.
Same issue as @hypersundays. Extracting the slp zip into the jar folder solved it.
See https://github.com/xissy/node-stanford-simple-nlp/tree/master/jar
from node-stanford-simple-nlp.
Related Issues (15)
- no suitable image found.
- heap problem
- timeout issues
- read me mistake?
- Failed at the [email protected] install script 'node-gyp rebuild' HOT 11
- Support for CoreNLP 3.6.0 (12/09/2015) release HOT 3
- Parsing ideas
- Unclear instructions in README/INSTALLATION HOT 2
- Cannot open include file: 'jni.h'
- Uncaught TypeError HOT 11
- Doc issues HOT 2
- Update class path for sentiment HOT 1
- basic-dependencies
- basic-dependencies required only as json object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-stanford-simple-nlp.