Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@telefonica/language-model-converter

Package Overview
Dependencies
Maintainers
11
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telefonica/language-model-converter

Language model converter for yot-bot

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-42.86%
Maintainers
11
Weekly downloads
 
Created
Source

language-model-converter

This is a tool to convert language files defined in yaml language model into the (LUIS)(http://luis.ai) internal JSON representation.

The language model

This is a yaml format file that is conveted to a JSON file that LUIS can undestand

Words preceed by # are comments, and its purpose is to leave some insights to people that will help on understanding whats going on. These words will be removed when training luis, so feel free to add as much as you want to help next colleagues that will manage the file


list.${examples}:  # Defines a example list to make substitutions in the utterances
  - heaven
  - hell
  
tef.intent.info: # Defines a Luis Intent
  - Tell me about the purgatory # Simple utterance
  - What is ${examples} # Substitution with list: Will generate for you "What is heaven" and "What is hell"

tef.intent.go: # Defines a Luis Intent
  - Go to [purgatory:tef.places] # Defines an entity "tef.places" giving "purgatory" as an example. The example is mandatory
  - Head to [${examples}:tef.places] # You can make substitution in the entity examples too!
  
phraselist:
  aksforinfo: # ex: How to ask for something synonims: 
    words: 
      - Tell me about
      - What is

  tef.places: # ex: Place examples here for training entities
    words: 
      - heaven
      - hell
      - purgatory
      - home
      

Limitations

As of writing this doc, the following limitations apply in LUIS Service

  • Max of 20 intents (tef.intent.info + tef.intent.go = 2)
  • Max of 50 chars for the intent name (tef.intent.info = 15)
  • Max of 10 phraselists (askforinfo + tef.places = 2)
  • Max of 10 entities ([something:tef.places]) You can provide as much examples as you want for the entities

Usage examples

npm install -g @telefonica/language-model-converter
language-model-converter --help 

  Usage: language-model-converter [options] <files>                                                                                                                                       
                                                                                                                                                                                          
  Convert language files defined to LUIS format                                                                                                                                           
                                                                                                                                                                                          
  Options:                                                                                                                                                                                
                                                                                                                                                                                          
    -h, --help               output usage information                                                                                                                                     
    -c, --culture <culture>  Culture code this files belongs to (ex. "en-us")                                                                                                             
                                                                                                                                                                                          
  Examples:                                                                                                                                                                               
                                                                                                                                                                                          
    Convert all files in 'models' and its subfolders, starting with 'en',                                                                                                                 
    setting the locale to en-us                                                                                                                                                           
      $ language-model-converter ./models/**/en*.yaml -c en-us   

Notice that you can use luis-cli to import or update the generated LUIS models.

Keywords

FAQs

Package last updated on 27 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc