www.npmjs.com Open in urlscan Pro
2606:4700::6811:dfaf  Public Scan

Submitted URL: https://badge.fury.io/js/luisgen
Effective URL: https://www.npmjs.com/package/luisgen
Submission: On September 22 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

GET /search

<form id="search" method="GET" action="/search" class="_13c93d41 relative flex bg-transparent ph3 ph2 pv2 ph0-ns pv0-ns bt b--black-10 bn-ns">
  <div class="e82b10fd relative dde91b96">
    <div class="_2f299eeb nowrap flex"><span class="_705cdf4f db fl pl3 pr1"><svg width="15px" height="15px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" aria-hidden="true">
          <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
            <g stroke="#777777" stroke-width="1.3">
              <g>
                <path d="M13.4044,7.0274 C13.4044,10.5494 10.5494,13.4044 7.0274,13.4044 C3.5054,13.4044 0.6504,10.5494 0.6504,7.0274 C0.6504,3.5054 3.5054,0.6504 7.0274,0.6504 C10.5494,0.6504 13.4044,3.5054 13.4044,7.0274 Z"></path>
                <path d="M11.4913,11.4913 L17.8683,17.8683"></path>
              </g>
            </g>
          </g>
        </svg></span><input type="search" role="combobox" name="q" hotkeys="[object Object]" placeholder="Search packages" aria-label="Search packages" aria-controls="typeahead-list-281028" aria-expanded="false" aria-activedescendant=""
        inputref="[object Object]" autocomplete="off" class="_390acbc5 f5 fw3 black relative" value="" element="input"></div>
  </div><button type="submit" class="_0da775bb bn pv2 ph4 f6 white pointer bn pv2 ph4 f6 white pointer" aria-label="Search">Search</button><input type="hidden" name="csrftoken" value="qJe8HSlQxzVj5En_Vmzrp2lm_g1RN9zPQ7ALZz1gQUu">
</form>

Text Content

skip to:contentpackage searchsign in
❤
 * Pro
 * Teams
 * Pricing
 * Documentation

npm


Search
Sign UpSign In


LUISGEN

2.2.0 • Public • Published 5 years ago
 * Readme
 * Code Beta
 * 0 Dependencies
 * 0 Dependents
 * 10 Versions


LUISGEN COMMAND LINE TOOL



LUISGen is a tool for generating a strongly typed C# class or typescript
interface to make consuming LUIS output easier. This enables build-time error
checking and intellisense against the entities which are defined in your LUIS
application model.


PREREQUISITE

This tool depends on having DotNet Core SDK 2.1 installed on your system.


INSTALLATION

LUISGen is a .NET Core Tool and can be installed directly using .NET Core
command line:

dotnet tool install -g LUISGen

This NPM package is a simple wrapper around the dotnet tool install command.

npm install -g luisgen 


GENERATING A CLASS FOR YOUR LUIS APPLICATION

The LUISGen tool generates a strongly typed class for the intents and entities
which are defined in your LUIS application model.

To generate from a saved model .JSON file you invoke from the CLI like this:

LUISGen <AppNameLUISExport.json> [-cs|-ts] CLASSNAME -o PATH

If a .JSON file is not passed in, LUISGen can assume that the JSON is being
piped in via stdin if you add an --stdin parameter. This allows you to use the
LUIS CLI tool to export your application model and pipe it directly into the
LUISGen tool like this:

luis export version --appId {luisAppId} --versionId {versionId} --authoringKey {authoringKey} 
    | luisgen --stdin [-cs|-ts] CLASSNAME -o PATH

> NOTE: The LUIS CLI tool can be installed with the npm command: npm install -g
> luis-apis

At least one of -cs or -ts must be supplied:

 1. -cs {CLASSNAME} - Generates C# class file including namespace. Default is
    Luis.APPNAME if no class name is specified.

 2. -ts {CLASSNAME} - Generates Typescript interface descriptions. Default is
    APPNAME if no class name is specified.

-o PATH specifies the output path to the generated files. Default value is the
directory where the export file is located.


USING THE GENERATED CLASS IN C# 1) ADD THE .CS FILE TO YOUR PROJECT. 2)

Call your LuisRecognizer instance supplying the type to .Recognize:

var result = recognizer.Recognize<CLASSNAME>("hi", CancellationToken.None);

The variable will be strongly typed LUIS result.


USING THE GENERATED CLASS IN TYPESCRIPT

 1. Add the .ts file to your project.
 2. Call your LuisRecognizer instance and type the returned result with your
    class.

let app : CLASSNAME = await recognizer.recognize(context);

The callback value app will be a strongly typed LUIS result.


README


KEYWORDS

none







PACKAGE SIDEBAR


INSTALL

npm i luisgen


REPOSITORY

Gitgithub.com/Microsoft/botbuilder-tools


HOMEPAGE

github.com/Microsoft/botbuilder-tools#readme


DOWNLOADSWEEKLY DOWNLOADS

20


VERSION

2.2.0


LICENSE

MIT


UNPACKED SIZE

4.13 kB


TOTAL FILES

3


ISSUES

11


PULL REQUESTS

87


LAST PUBLISH

5 years ago


COLLABORATORS

 * 
 * 
 * 

Try on RunKit
Report malware


FOOTER


SUPPORT

 * Help
 * Advisories
 * Status
 * Contact npm


COMPANY

 * About
 * Blog
 * Press


TERMS & POLICIES

 * Policies
 * Terms of Use
 * Code of Conduct
 * Privacy