npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

watson-assistant-skills-merger

v0.2.3

Published

Combines and merges seperate IBM Watson Assistant Dialog Skill into one; integrates intents, entities and dialogs of one skill with another without one overriding the other.

Downloads

19

Readme

watson-assistant-skills-merger

Combines and merges seperate IBM Watson Assistant Dialog Skill into one; integrates intents, entities and dialog contents of one skill with another without one overriding the other.

A feature currently not possible with IBM Watson Cloud Assistant Service. Program merges two seperate Watson Skills into One.

Folder groupings and Dialogue (Dialog Trees with children) are also kept intact.

Conflict Resolution

DialogNodes with the same DialogIDs are renamed. All intents are merged into one User is expected to manually review the merged Skills upon reupload to IBM Cloud.

Inputs

2 Valid JSON files (possibly exported) from IBM Watson Assistant, JSON file locations to be used as app arguments.

Node Modules

No external NodeModules are required, hence no download or Internet connection required to run program. Merges 2 Wastson Assistant Skills exported from Watson Assistant without overriding the other. A feature currently not possible with IBM Watson Cloud Assistant Service

Error Validation

Validation is done ahead of the skillMerging process. JSON Format validation checking is done, as well as additional checks to ensure JSON structure follows a typical exported skill from Watson Assistant.

How it works

  1. Check that both skills files are JSON
  2. Checks for properties usually found in exported Watson Assistant Skills e.g. workspaceId, skillID etc.
  3. Merges Skill2 to Skill1
  4. Copy or merge intents and entities in skill1 and skill2
  5. Merge Dialogs in skill1 and skill2
  6. Rename duplicates/conflicts
  7. Generates a newly merged skill which can be reuploaded to IBM Cloud.

Modules Definition:

assistantSkillsMerger.js - Does the actual merging. one can download the "assistantSkillsMerger.js" and call the "combineWatsonSkills" function to merge 2 seperate Assistant skills.

fileValidator.js - 2 components: 1 validating JSON and the other ensuring Watson skill is valid.

index.js - Application entry point.

controller.js - Act as the application controller/scheduler, runs the validation check, consequently the merger.

How-To using Node Package Manager (NPM)

  1. Create a new js file i.e. myApp.js

  2. Create an app

var app = require('watson-assistant-skills-merger');
  1. Set the locations of the files to be merged
var file1 = require('./sample-skills-files/skill-SkillOne'); //Location of your skill1
var file2 = require('./sample-skills-files/skill-SkillTwo'); //Location of your skill2
  1. Call the app main function
app(file1, file2);
  1. install the NPM packages using
npm install --save watson-assistant-skills-merger
  1. Run your app e.g. "node myApp.js".

Your myApp.js should look identical to the folowing:

var app = require('watson-assistant-skills-merger');
var file1 = require('./skill-SkillOne'); //Location of your skill1
var file2 = require('./folder/skill-SkillTwo'); //Location of your skill2
app(file1, file2);

Setting Watson Assistant pricing plans

You can configure the type of Watson plan in the settings.json file. You can set the value to plan "lite" or "business".

Authors

Versioning

SemVer was used for versioning. SemVar Versioning (MAJOR.MINOR.PATCH)