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

@softforte/lu

v1.0.5

Published

Simple .lu format validator based on @microsoft/bf-lu library

Downloads

5

Readme

lu

Simple .lu format validator based on @microsoft/bf-lu library

oclif Version Downloads/week License

Introduction

Preparing LUIS training data by hand in the form of .lu files can get daunting quickly. Even though the Bot Framework Composer provides their validation, it is often hard to know exactly where the typo is. This simple command-line utility uses the same @microsoft/bf-lu parsing and validation library as does the Composer, but shows any errors more explicitly. To validate an .lu file just type:

$lu <path to .lu file>

Other times, even when the @microsoft/bf-lu validator is satisfied, the LUIS service may not be. To make sure a valid LUIS application can be created from the given .lu file, use this command:

$lu <path to .lu file> -l -k=<authoring_key> 

Upon completion of local validation it will connect to the LUIS service and attempt to create a temporary LUIS app using the contents of the .lu file. If creation of the temporary app succeeds then the app will be deleted automatically and validation will succeed. Otherwise, a detailed error message will be shown.

Installation

Install the tool using the following command:

$ npm install -g @softforte/lu

Configuration

The following additional configuration is only needed if you intend to validate the .lu file against LUIS service. Default cofiguration values are stored in the .env file and look as follows:

# Base URL of LUIS REST API
LUIS_APP_BASE_URL=https://westus.api.cognitive.microsoft.com

# REST API command path to import a temporary application
LUIS_APP_PATH_IMPORT=/luis/authoring/v3.0-preview/apps/import

# REST API command path to delete a temporary application
LUIS_APP_PATH_DELETE=/luis/authoring/v3.0-preview/apps

# Prefix of temporary LUIS application name (the suffix is randomly generated)
LUIS_APP_NAME_PREFIX=tmp-lu-validation

The .env file is located inside the root directory the @softforte/lu package resides in. For global installations (-g flag) on most systems this file would be under /usr/local/lib/node_modules/@softforte/lu. On Windows it would normally be in %AppData%\npm\node_modules\@softforte\lu directory. These values could also be set as environment variables, in which case they would take precedence over the contents of the .env file. For more information see dotenv npm package documentation.

Typically you would only want to change the value of LUIS_APP_BASE_URL in there to match that of the Endpoint value on the Keys and Endpoint tab of the LUIS authoring resource in your Azure tenant.

Usage

$ lu [FILE]

ARGUMENTS
  FILE    <path to .lu file>

OPTIONS
  -h, --help                   show CLI help
  -k, --key=authoring_key      LUIS authoring key required when using --luis/-l option
  -l, --luis                   validates the ability to import parsed .lu file to a temporary LUIS application
  -o, --out=file               file path to save the generated JSON to
  -v, --version                show CLI version

LUIS authoring key is used for connecting to the LUIS authornig resource via REST API. You can optionally save the JSON representation of the model to a file using the -o option with a path to persist the JSON to.