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

jovo-v4-community-hook-model-linter

v0.0.3

Published

Have your Jovo model auto validated during build before using it

Downloads

6

Readme

Model Linter for Jovo V4

Overview

Small flaws in your voice model can cause serious malfunctions at runtime.

A concept frequently used in software development is called "linting". Linting refers to the process of static code analysis and is used to flag programming errors, bugs, stylistic errors and suspicious constructs.

Surprisingly I don't see this concept being used often with voice model files though I see a big potential here.

This is why I collected some of my voice model test scripts and bundled them together as a Jovo extension. This hook for the Jovo V4 Framework will auto check your model files against a number of rules when you run the build process.

You can easily integrate this "hook" into your build process by following this documentation.

Voice model maintenance is hard

Maintaining voice model files is hard especially when they grow and get bigger. So easily you add duplicate contents without notice or use same utterances for different intents which may later lead to strange behaviour of your application at runtime.

How can Model Linter help?

The Model Linter will auto check your voice model files against a number of rules when you run the Jovo build process. While doing this the policy is to never break a build but to print meaningful warnings on the console in case something seems odd.

You may know why your are doing things as they are, so technically you can simply ignore the warnings. It is a good idea though to double check what Model Linter is complaining about.

How does Model Linter look like?

Model Linter hooks into the build process. It remains silent if there is nothing to say. In case some rule is violated then you will see a warning message on the console. The message is intended to support you with information about where the problem is and how to maybe fix it.

An example may look as follows:

Model Linter example output on console

Why should I use the Model Linter?

It costs nothing and may save you a lot of time! For sure you have better things to do 🙂

Is Model Linter complete?

Definitely not: up to now there are about ten different warning messages. Obviously you could do more. But you have to start somewhere with a project and if you like Model Linter then tell me and I might add more rules to the list.

Install

The hook can be installed as a package via npmjs. For more information see here:

NPM

From the console you may install the hook right into your Jovo project and save the dependency in your package.json:

npm install jovo-v4-community-hook-model-linter --save

Register the hook in:

jovo.project.js:

const { ModelLinterHook } = require("jovo-v4-community-hook-model-linter");

const project = new ProjectConfig({
  hooks: {
    'before.build:platform': [ModelLinterHook],
  }, // [...]

jovo.project.ts:

import { ModelLinterHook } from "jovo-v4-community-hook-model-linter";

const project = new ProjectConfig({
  hooks: {
    'before.build:platform': [ModelLinterHook],
  }, // [...]

Further reading

When defining your voice model it is important to know and respect the rules and limitations from a target platform. Therefore the following might be wort a read:

  • Alexa platform: "Rules for sample utterances":

    https://developer.amazon.com/en-US/docs/alexa/custom-skills/create-intents-utterances-and-slots.html#h3_intentref_rules

License

Apache V2

Acknowledgements

The code published here is part of the project "Voice QL" which receives funding from the German Federal Ministry of Education and Research (FKZ 01IS22S30)

Logo Bundesministerium für Bildung und Forschung     Logo Open Knowledge Foundation     Logo Prototype Fund

The Prototype Fund is a project of the Open Knowledge Foundation Germany, funded by the German Federal Ministry of Education and Research (BMBF).