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

@level.ai/chatito

v2.1.5

Published

Generate training datasets for NLU chatbots using a simple DSL

Downloads

3

Readme

Chatito

npm version CircleCI branch npm License

Alt text

Try the online IDE!

Donate

Alt text

Designing and maintaining chatito takes time and effort, if it was usefull for you, please consider making a donation and share the abundance! :)

Overview

Chatito helps you generate datasets for training and validating chatbot models using a minimalistic DSL.

If you are building chatbots using commercial models, open source frameworks or writing your own natural language processing model, you need training examples. Chatito is here to help you.

This project contains the:

Chatito language

For the full language specification and documentation, please refer to the DSL spec document.

Adapters

The language is independent from the generated output format and because each model can receive different parameters and settings, there are 3 data format adapters provided. This section describes the adapters, their specific behaviors and use cases:

Default format

Use the default format if you plan to train a custom model or if you are writting a custom adapter. This is the most flexible format because you can annotate Slots and Intents with custom entity arguments, and they all will be present at the generated output, so for example, you could also include dialog/response generation logic with the dsl. E.g.:

%[some intent]('context': 'some annotation')
    @[some slot] ~[please?]

@[some slot]('required': 'true', 'type': 'some type')
    ~[some alias here]

Custom entities like 'context', 'required' and 'type' will be available at the output so you can handle this custom arguments as you want.

Rasa NLU

Rasa NLU is a great open source framework for training NLU models. One particular behavior of the Rasa adapter is that when a slot definition sentence only contains one alias, the generated rasa dataset will map the alias as a synonym. e.g.:

%[some intent]('training': '1')
    @[some slot]

@[some slot]
    ~[some slot synonyms]

~[some slot synonyms]
    synonym 1
    synonym 2

In this example, the generated rasa dataset will contain the entity_synonyms of synonym 1 and synonym 2 mapping to some slot synonyms.

Snips NLU

Snips NLU is another great open source framework for NLU. One particular behavior of the Snips adapter is that you can define entity types for the slots. e.g.:

%[date search]('training':'1')
   for @[date]

@[date]('entity': 'snips/datetime')
    ~[today]
    ~[tomorrow]

In the previous example, all @[date] values will be taged with the snips/datetime entity tag.

NPM package

Chatito is supports nodejs v8.11.2 LTS or higher.

Install it globally:

npm i chatito -g

Or locally:

npm i chatito --save

Then create a definition file (e.g.: trainClimateBot.chatito) with your code.

Run the npm generator:

npx chatito trainClimateBot.chatito

The generated dataset should be available next to your definition file.

Here is the full npm generator options:

npx chatito <pathToFileOrDirectory> --format=<format> --formatOptions=<formatOptions> --outputPath=<outputPath> --trainingFileName=<trainingFileName> --testingFileName=<testingFileName>
  • <pathToFileOrDirectory> path to a .chatito file or a directory that contains chatito files. If it is a directory, will search recursively for all *.chatito files inside and use them to generate the dataset. e.g.: lightsChange.chatito or ./chatitoFilesFolder
  • <format> Optional. default, rasa or snips
  • <formatOptions> Optional. Path to a .json file that each adapter optionally can use
  • <outputPath> Optional. The directory where to save the generated datasets. Uses the current directory as default.
  • <trainingFileName> Optional. The name of the generated training dataset file. Do not forget to add a .json extension at the end. Uses <format>_dataset_training.json as default file name.
  • <testingFileName> Optional. The name of the generated testing dataset file. Do not forget to add a .json extension at the end. Uses <format>_dataset_testing.json as default file name.

Author and maintainer

Rodrigo Pimentel