Perform Named Entity Recognition in JavaScript
Extracting entities from a string can be a complicated and time-consuming process, but the information provided by entities such as addresses, URLs, or phone numbers is invaluable for businesses. To speed up the extraction process, you can use the below Natural Language Processing API in JavaScript to automatically extract the named entities from an input string.
Our first step is to install jQuery by running this command:
bower install jquery
After the installation is complete, we can call the validation function:
var settings = {
"url": "https://api.cloudmersive.com/validate/text-input/check/sql-injection",
"method": "POST",
"timeout": 0,
"headers": {
"detectionLevel": "<string>",
"Content-Type": "application/json",
"Apikey": "YOUR-API-KEY-HERE"
},
"data": JSON.stringify("<string>"),
};$.ajax(settings).done(function (response) {
console.log(response);
});
The returned response will indicate if a SQL injection attack was located in the target text. To retrieve your API key, visit the Cloudmersive website to register for a free account; this will provide 800 calls/month across our library of APIs.