stanford-corenlp
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -11,3 +11,3 @@ var java = require('java'); | ||
function loadLibrary(path){ | ||
function loadLibrary(path,version){ | ||
java.classpath.push(path+"/ejml-0.23.jar"); | ||
@@ -17,4 +17,4 @@ java.classpath.push(path+"/joda-time.jar"); | ||
java.classpath.push(path+"/xom.jar"); | ||
java.classpath.push(path+"/stanford-corenlp-3.3.1-models.jar"); | ||
java.classpath.push(path+"/stanford-corenlp-3.3.1.jar"); | ||
java.classpath.push(path+"/stanford-corenlp-"+version+"-models.jar"); | ||
java.classpath.push(path+"/stanford-corenlp-"+version+".jar"); | ||
}; | ||
@@ -28,10 +28,11 @@ | ||
if(options.nlpPath){ | ||
loadLibrary(options.nlpPath); | ||
} | ||
if(options.nlpPath && options.version) | ||
loadLibrary(options.nlpPath,options.version); | ||
else | ||
return callback(new Error('No library path specified')); | ||
if(options.nlpPath) | ||
loadLibrary(options.nlpPath,"3.4"); | ||
else | ||
return callback(new Error('No library path specified')); | ||
if ((callback != null) && typeof callback === 'function') { | ||
console.log("pipeline"); | ||
this.loadPipeline(options, callback); | ||
@@ -38,0 +39,0 @@ } |
{ | ||
"name": "stanford-corenlp", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"author": "Hitesh Joshi <me@hiteshjoshi.com>", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -26,3 +26,3 @@ # node-stanford-corenlp | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp"},function(err) {}); | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp","version":"3.4"},function(err) {}); | ||
``` | ||
@@ -36,3 +36,3 @@ | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp"},function(err) { | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp","version":"3.4"},function(err) { | ||
coreNLP.process('This is so good.', function(err, result) { | ||
@@ -48,3 +48,3 @@ console.log(err,JSON.stringify(result)); | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp"}); | ||
var coreNLP = new NLP.StanfordNLP({"nlpPath":"./corenlp","version":"3.4"}); | ||
coreNLP.loadPipelineSync(); | ||
@@ -51,0 +51,0 @@ coreNLP.process('This is so good.', function(err, result) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14423
233