![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
nlp-hub is a micro-framework that connects you to multiple natural language processing engines such as LUIS, QnA Maker Watson or even local regular expressions.
nlp-hub allows you to build lightweight chatbots aimed for scenarios with minimal context (think: question -> answer). You can use different strategies to reduce processing costs, increase reliability or improve performance, depending on your goals.
Set up the JSON definition file. Note that each provider has its own parameters.
{
"threshold":"0.8",
"apps":[
{"id":"HolaRegex", "intent":"Saludo", "exp":"(^hola$|^holaa$|^holas$|^holi$|^holis$|^hi$|^hello$)", "type":"regex"},
{"id":"ComprarVueloRegex", "intent":"ComprarVuelo", "exp":"^Comprar vuelo$", "type":"regex"},
{"id":"5d90b68...", "key":"3f7eb1b5...", "type":"luis"},
{"id":"3285f3b...", "key":"3f7eb1b5...", "type":"luis"},
{"id":"QnA_BOFA_ES", "kb":"055836...", "key":"bdfa0e...", "type":"qnamaker"}
]
}
Then call the strategy of your choice from your code.
nlp.firstMatch(query, function(response) {
console.log(`The first detected intent was ${response.intent.name} according to ${response.engine}`);
});
Runs each app syncronously on the JSON definition file and stops after finding the first one that goes over the threshold. Use this strategy for cost-effectiveness.
nlp.firstMatch(query, function(response) {
console.log(`The first detected intent was ${response.intent.name} according to ${response.engine}`);
});
Runs each app on the JSON definition file asynchronously and in parallel, computes and finds the best score. Use this strategy for reliability.
nlp.bestMatch(query, function(response) {
console.log(`The first detected intent was ${response.intent.name} according to ${response.engine}`);
});
To support LUIS, add an app on the apps.json definition file with the following fields:
[{"id":"5d90b68..", "key":"3f7eb1..", "type":"luis"}]
To support QnA Maker, add an app on the apps.json definition file with the following fields:
[{"id":"QnA_BOFA_ES", "kb":"05583..", "key":"bdfa0ea..", "type":"qnamaker"}]
To support Regular Expressions, add an app on the apps.json definition file with the following fields:
[{"id":"HolaRegex", "intent":"Saludo", "exp":"(^hola$|^holaa$|^holas$|^holi$|^holis$|^hi$|^hello$)", "type":"regex"},]
To integrate nlp-hub with Microsoft Bot Framework, you can simply use a root dialog to call nlp.firstMatch or any other strategy of your choice. You could also trigger different dialogs based on the user input if you wanted to.
This is an example of the simplest integration between nlp-hub and Microsoft Bot Framework.
var builder = require('botbuilder');
var nlp = require('../core/core.js');
var connector = new builder.ConsoleConnector().listen();
var bot = new builder.UniversalBot(connector);
nlp.load('../apps.json');
bot.dialog('/', [
function (session) {
nlp.firstMatch(session.message.text, function(response) {
session.send(`The first detected intent was ${response.intent.name} according to ${response.engine}`);
});
}
]);
FAQs
The hub for natural language processing (nlp) engines.
The npm package nlp-hub receives a total of 1 weekly downloads. As such, nlp-hub popularity was classified as not popular.
We found that nlp-hub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.