Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

calais-entity-extractor

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calais-entity-extractor - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

60

lib/calais-entity-extractor.js

@@ -365,9 +365,14 @@ var request = require('request');

// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
try {
// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
var parsedResult = calais._parseCalaisData(result, calais.options.minConfidence);
var parsedResult = calais._parseCalaisData(result, calais.options.minConfidence);
return cb(parsedResult, calais.errors);
return cb(parsedResult, calais.errors);
} catch {
return cb({}, e);
}
} else

@@ -438,9 +443,14 @@ return cb({}, 'Request error: ' + (typeof response === 'string' ? response : JSON.stringify(response)));

// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
try {
// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
var parsedResult = calais._parseCalaisData(result, calais.options.minConfidence);
var parsedResult = calais._parseCalaisData(result, calais.options.minConfidence);
return cb(parsedResult, calais.errors);
return cb(parsedResult, calais.errors);
} catch(e) {
return cb({}, e);
}
} else

@@ -496,9 +506,13 @@ return cb({}, 'Request error: ' + (typeof response === 'string' ? response : JSON.stringify(response)));

// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
try {
// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
var parsedResult = calais._parseCalaisSearchResult(result);
var parsedResult = calais._parseCalaisSearchResult(result);
return cb(parsedResult, calais.errors);
return cb(parsedResult, calais.errors);
} catch(e) {
return cb({}, e);
}
} else

@@ -539,8 +553,14 @@ return cb({}, 'Request error: ' + (typeof response === 'string' ? response : JSON.stringify(response)));

// parse to a Javascript object if requested
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
try {
// parse to a Javascript object if requested
var parsedResult = calais._parseCalaisLookupResult(result);
return cb(parsedResult, calais.errors);
var result = JSON.parse(calaisData);
result = (typeof result === 'string') ? JSON.parse(result) : result;
var parsedResult = calais._parseCalaisLookupResult(result);
return cb(parsedResult, calais.errors);
} catch (e) {
return cb({}, e);
}
} else

@@ -547,0 +567,0 @@ return cb({}, 'Request error: ' + (typeof response === 'string' ? response : JSON.stringify(response)));

{
"name": "calais-entity-extractor",
"version": "1.3.2",
"version": "1.3.3",
"description": "Extract entities from text using Open Calais.",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc