
Snips NLU - Detailed Review
Language Tools

Snips NLU - Product Overview
Introduction to Snips NLU
Snips NLU (Natural Language Understanding) is an open-source AI-driven tool that enables machines to interpret and act on human language. Here’s a brief overview of its primary function, target audience, and key features.
Primary Function
Snips NLU is designed to detect the intention (intent) behind a user’s natural language input and extract relevant parameters (slots) from the query. This process allows the system to translate user input into a machine-readable format, enabling appropriate actions or responses.
Target Audience
The primary users of Snips NLU are developers and businesses looking to integrate natural language processing capabilities into their applications, such as chatbots, voice assistants, and home automation systems. It is particularly useful for those who need to build custom NLU solutions without relying on cloud services.
Key Features
- Intent Detection: Snips NLU identifies the user’s intent from their input, such as turning on lights or adjusting the thermostat.
- Slot Extraction: It extracts specific parameters or slots from the user’s query, like the room where the lights need to be turned on.
- Customizable Configuration: The engine can be configured to suit different languages and specific requirements. It includes language-specific enhancements and resources to improve performance.
- Training and Persistence: Snips NLU allows developers to train and persist engines using specific datasets. This can be done through APIs, such as the `/engine/train` endpoint, which enables loading and reloading engines as needed.
- Dynamic Entities: The system supports dynamic entities, which can be trained and used on the fly to handle variable data, such as names or locations.
- Multi-Language Support: Snips NLU supports multiple languages, each with its own set of features and enhancements to ensure accurate interpretation.
Usage
Developers can create an NLU engine using the SnipsNLUEngine class and train it with a dataset formatted according to Snips’ specifications. This engine can then be used to parse user input and extract the necessary information to perform the desired actions.
By leveraging these features, Snips NLU enables developers to build sophisticated and interactive applications that can effectively interpret and respond to user inputs.

Snips NLU - User Interface and Experience
User Interface and Experience of Snips NLU
The user interface and experience of Snips NLU, particularly in the context of its API and usage, are centered around simplicity and ease of use, especially for developers familiar with Python.Creating and Configuring the NLU Engine
To start using Snips NLU, you create an instance of the `SnipsNLUEngine` class, which is the main API for intent parsing. This can be done with default parameters, which are often sufficient for many use cases: “`python from snips_nlu import SnipsNLUEngine default_engine = SnipsNLUEngine() “` For more customized configurations, you can load language-specific resources and pass a configuration file to the engine. This allows for adjustments such as setting a random seed for reproducible trainings or using different language settings.Dataset and Training
The dataset for Snips NLU is formatted in a simple and readable way, using a markdown-like annotation. You can create this dataset manually or use the provided CLI tools to generate the necessary files. The dataset includes intents and entities, which are essential for training the engine. For example, you might have files like `turnLightOn.txt` and `room.txt` to define your intents and entities. Once the dataset is ready, you load it into the engine and train it using the `fit` method: “`python with io.open(“dataset.json”) as f: dataset = json.load(f) engine.fit(dataset) “`Parsing and Usage
After training the engine, you can use it to parse user queries. Here’s an example of how to parse a sentence: “`python engine.parse(u”Please give me some lights in the entrance !”) “` This process is straightforward and does not require extensive setup, making it accessible to developers who need to integrate NLU capabilities into their projects.Ease of Use
Snips NLU is designed to be user-friendly, especially for developers. The documentation provides clear tutorials and examples, making it easier to get started. The engine can be configured and trained with minimal code, and the dataset format is simple to understand and create. This ease of use is a significant advantage, as it allows developers to focus on integrating NLU into their applications without needing to delve deeply into the underlying complexities of natural language processing.Overall User Experience
The overall user experience is positive due to the clear documentation, simple setup process, and the flexibility to customize the engine according to specific needs. The ability to run Snips NLU on local devices or servers, ensuring data privacy, is also a significant benefit. This makes Snips NLU a viable alternative to cloud-based NLU services, offering a private-by-design solution that is GDPR compliant. In summary, Snips NLU offers a user-friendly interface that is easy to set up and use, making it a practical choice for developers looking to integrate NLU capabilities into their projects.
Snips NLU - Key Features and Functionality
Introduction
Snips NLU is an open-source Natural Language Understanding (NLU) library that offers several key features and functionalities, making it a powerful tool for building private-by-design voice assistants and other NLU applications.Training and Parsing
Snips NLU allows you to train and use NLU engines to parse sentences written in natural language and extract structured information. You can create an NLU engine using the `SnipsNLUEngine` class, and this engine can be trained with language-specific resources to improve performance.Engine Training and Persistence
The Snips NLU server provides endpoints to train and persist NLU engines. For example, the `/engine/train` endpoint allows you to train an engine from a language model and persist it locally. This approach enables loading the engine on demand rather than keeping it running continuously. Additionally, there is support for dynamic entities, which can be trained and used on the fly.Dynamic Entities
Dynamic entities are a feature that allows for the training of dedicated engines for specific entities. This is particularly useful when dealing with variables that change frequently. The `/engine/train/dynamic-entities` endpoint handles this functionality, enabling the parsing of messages with dynamic entities.Parsing Messages
The main endpoint for parsing messages is `/engine/parse`. This endpoint takes a message and uses the previously trained and persisted engine to extract the resolved values. It also supports parsing messages with dynamic entities, falling back to the default engine if necessary.Privacy and On-Device Processing
One of the significant benefits of Snips NLU is its ability to handle Natural Language Understanding fully on-device, ensuring that no private voice data is sent to the cloud. This makes it ideal for applications where data privacy is a priority. The library is optimized to run on various devices, including servers, tablets, mobiles, and other connected devices.Cross-Platform Compatibility
Snips NLU is highly portable and can run in diverse environments. It uses Rust for inference, which offers high performance, low memory overhead, and cross-compilation capabilities. This allows the same code to run on Linux, iOS, Android, and other platforms.Performance and Footprint
The library is engineered to provide accuracy and efficiency. It has a small memory footprint, ranging from a few hundred KB to a few MB for more complex assistants, and significantly reduces inference runtime compared to cloud-based NLU services.Integration and Ecosystem
Snips NLU integrates well with other tools and platforms. For example, it can be used within the Jovo framework for building voice assistants, and it supports various language models and configurations.Conclusion
In summary, Snips NLU offers a comprehensive set of features for natural language understanding, including engine training, dynamic entities, on-device processing, cross-platform compatibility, and efficient performance, making it a versatile and privacy-focused NLU solution.
Snips NLU - Performance and Accuracy
Performance and Accuracy Metrics
Snips NLU is compared against other prominent NLU services in several studies. One such study evaluates the performance and calibration of various NLU services, including Snips NLU, Watson Assistant, LUIS, and Rasa.
Accuracy
- Accuracy: Snips NLU shows an average accuracy of around 0.89, which is comparable to LUIS but lower than Watson Assistant’s accuracy of approximately 0.92. Rasa-Sklearn has the lowest accuracy at about 0.87.
F1-Score
- F1-Score: The F1-scores for Snips NLU are also around 0.89, similar to LUIS and slightly lower than Watson Assistant. Rasa-DIET and Rasa-Sklearn have F1-scores of 0.90 and 0.79 respectively.
Calibration
Calibration refers to how well the confidence estimates of the NLU align with its actual performance. Snips NLU is found to be one of the least calibrated NLU services:
Calibration Scores
- Calibration Scores: Snips NLU has the lowest Spearman’s correlation coefficient among the evaluated NLUs, indicating poor calibration. Rasa-Sklearn, on the other hand, is the best calibrated.
Limitations and Areas for Improvement
- Overconfidence: Snips NLU tends to be over-confident in its predictions, especially in lower ranks. This means it may assign high confidence to predictions that are not accurate, which can be problematic in real-world applications.
- Intent Classification and Slot Filling: While Snips NLU performs reasonably well in intent classification and slot filling, it may not match the performance of other services like Watson Assistant. However, it is competitive with LUIS in these metrics.
- Handling Out-of-Scope (OOS) Intents: The study notes that Snips NLU’s OOS handling cannot be configured, which might affect its performance in scenarios where out-of-scope intents are common. This is an area where other NLUs might have an advantage.
Operational Considerations
Improving NLU accuracy, including for Snips NLU, involves continuous monitoring and updating of the models. Here are some general recommendations:
Regular Updates and Testing
- Regular Updates and Testing: Regularly run insights and testing tools to identify areas for optimization. This can help in maintaining and improving the accuracy over time.
Data Quality and Feedback
- Data Quality and Feedback: Ensuring high-quality training data and feedback loops can significantly improve the performance and accuracy of Snips NLU. This involves manual and often time-consuming processes, but it is crucial for maintaining a high level of accuracy.
In summary, while Snips NLU performs well in terms of accuracy and F1-scores, it has limitations, particularly in calibration and handling out-of-scope intents. Addressing these areas through continuous improvement and high-quality data can enhance its overall performance.

Snips NLU - Pricing and Plans
Availability and Use of Snips NLU
The Snips NLU library, which is now maintained as an open-source project after being acquired by Sonos, does not offer any commercial pricing plans or tiers. Here are the key points regarding its availability and use:
Free and Open-Source
Snips NLU is completely free and open-source. The repository is available on GitHub, and developers can use it without any cost.
No Commercial Support
Since Snips is no longer actively maintained by its original developers, there is no commercial support or consulting services available. The repository has been stale for years, so users should not expect updates, improvements, or technical support.
Features and Usage
The library is lightweight and efficient, capable of running on IoT devices. It allows developers to train, deploy, and run their own Natural Language Understanding engines locally, ensuring data privacy and faster processing times. The features include intent recognition, entity extraction, and support for multiple languages, all of which are accessible through the open-source codebase.
Summary
In summary, Snips NLU does not have any pricing structure or different tiers; it is entirely free and open-source, but it lacks active maintenance and commercial support.

Snips NLU - Integration and Compatibility
Introduction
Snips NLU is a versatile and highly compatible natural language understanding (NLU) engine that can integrate with a variety of tools and platforms, ensuring flexibility and privacy in its application.Integration with Jovo Framework
Snips NLU can be seamlessly integrated with the Jovo Framework, a popular platform for building voice and chatbot applications. This integration is facilitated through the `@jovotech/nlu-snips` plugin, which allows you to translate raw text input into structured meaning compatible with Jovo’s intent structure. You can add this plugin to the Jovo Core Platform or other Jovo platforms like the Jovo Web Platform, Facebook Messenger, or Google’s Business Messages.Configuration and Setup
To integrate Snips NLU with Jovo, you need to configure the `SnipsNlu` plugin by specifying the API endpoint of the Snips NLU server, the server path, fallback language, and other optional parameters such as `engineId` and `dynamicEntities`. Here is an example of how to add this plugin to your Jovo application: “`typescript import { CorePlatform } from ‘@jovotech/platform-core’; import { SnipsNlu } from ‘@jovotech/nlu-snips’; const app = new App({ plugins: [ new CorePlatform({ plugins: [ new SnipsNlu({ serverUrl: ‘http://localhost:5000/’, serverPath: ‘/engine/parse’, fallbackLanguage: ‘en’, // Other configurations }), ], }), ], }); “`Dynamic Entities
Snips NLU also supports dynamic entities, which can be trained and updated dynamically based on the entities defined in your application. This feature allows the Snips NLU server to train an updated model for the intents that use these entities, enhancing the accuracy and adaptability of the NLU engine.Compatibility Across Devices and Platforms
Snips NLU is highly compatible and can run on various devices and platforms, including:Edge Devices
Snips NLU can run directly on edge devices, such as connected home devices, ensuring that user data is processed locally without being sent to the cloud. This approach enhances privacy and compliance with regulations like GDPR.Mobile and Desktop
The Snips NLU engine can be used on mobile, desktop, and server environments, making it versatile for different use cases.Server Environments
You can set up a Snips NLU server using Python, which allows you to train and persist NLU engines and parse messages. This server can be configured to work with different locales and dynamic entities.Language Support
Snips NLU supports multiple languages, including English, French, German, Spanish, and Korean, with more languages being added regularly. This makes it a suitable choice for applications targeting diverse user bases.Conclusion
In summary, Snips NLU offers a highly flexible and private-by-design solution for natural language understanding, integrating seamlessly with various platforms and devices while ensuring strong performance and accuracy.
Snips NLU - Customer Support and Resources
Customer Support Options for Snips NLU
For users of Snips NLU, several customer support options and additional resources are available to ensure effective usage and troubleshooting of the platform.
Documentation
The primary resource for Snips NLU is its comprehensive documentation, which can be found at snips-nlu.readthedocs.io. This documentation is divided into various sections, including setup, building a toy example, creating your own NLU engine, and detailed explanations of NLU concepts used in the library. It also includes tutorials and guides on how to generate datasets, create and train NLU engines, and parse sentences.
GitHub Repository
Snips NLU has an active GitHub repository where users can access the source code, report issues, and contribute to the project. The repository includes detailed README files, issue trackers, and pull requests, making it a valuable resource for developers looking to customize or troubleshoot the library.
Command Line Interface (CLI)
Snips NLU provides a Command Line Interface (CLI) that allows users to generate datasets, train models, and perform other tasks efficiently. The CLI is well-documented and can be used to automate many of the steps involved in setting up and using the NLU engine.
Language Support and Configurations
The library supports multiple languages, including English, French, German, Italian, Japanese, Korean, Portuguese, Portuguese (Brazilian), and Spanish. Users can configure the NLU engine using language-specific configurations, which are provided in the default configurations section of the documentation.
Community and Forums
While the official documentation does not explicitly mention community forums or support groups, users can often find help and discussions on platforms like GitHub, Stack Overflow, or other developer communities where Snips NLU is discussed.
Additional Resources
For those integrating Snips NLU with other frameworks, resources like jovo.tech provide additional configuration and usage examples. This can be particularly helpful for developers looking to use Snips NLU within a larger application ecosystem.
Conclusion
By leveraging these resources, users can effectively set up, use, and troubleshoot Snips NLU to extract structured information from natural language inputs.

Snips NLU - Pros and Cons
Advantages of Snips NLU
Precision and Structured Data Extraction
Snips NLU is adept at extracting structured information from natural language inputs. It can accurately detect the user’s intent and extract relevant parameters (slots) from the query, making it useful for building chatbots and voice assistants.
Private-by-Design
Snips NLU is designed with privacy in mind, allowing developers to create voice assistants that do not rely on cloud services, thus keeping user data private.
Multi-Parser Approach
The Snips NLU engine uses a combination of intent parsers, including a conservative parser for simple patterns and a machine-learning-based parser for unseen utterances. This approach ensures good precision and recall.
Ease of Use
The library provides comprehensive documentation and a step-by-step guide for setup and usage, making it accessible for developers to integrate into their projects.
Intent Classification and Slot Filling
Snips NLU performs well in intent classification and slot filling tasks, as evidenced by benchmarks that compare it favorably with other NLU providers like API.ai (Dialogflow), Luis.ai (Microsoft), IBM Watson, and Rasa NLU.
Disadvantages of Snips NLU
Calibration Issues
Studies have shown that Snips NLU tends to be less calibrated compared to other NLU systems. It often underestimates the true likelihood of its predictions, which can affect the reliability of its confidence estimates.
Performance in Certain Scenarios
While Snips NLU is generally good at intent classification and slot filling, it may not perform as well as other systems like IBM Watson in terms of overall accuracy. For instance, Watson has been shown to have higher accuracy in intent classification tasks.
Limited Configurability for OOS Handling
Snips NLU’s out-of-scope (OOS) intent handling cannot be configured, which can limit its flexibility in certain applications where OOS handling is crucial. This lack of configurability can affect the fairness of comparisons with other NLUs that handle OOS intents differently.
Specific Parser Limitations
The LookupIntentParser, which is used first in the Snips NLU engine, is very strict and has a low recall, meaning it may miss some intents that are not perfectly matched to the predefined patterns.
By considering these points, developers can make informed decisions about whether Snips NLU is the right tool for their specific needs.

Snips NLU - Comparison with Competitors
When Comparing Snips NLU to Other NLU Solutions
When comparing Snips NLU to other Natural Language Understanding (NLU) solutions in the language tools AI-driven product category, several key aspects and unique features stand out.
Privacy and Data Handling
Snips NLU is distinct for its “Private by Design” approach. It runs entirely on the edge or on a local server, ensuring that user data is never collected, processed, or touched by external servers. This is a significant advantage over cloud-based services like Dialogflow (Google), Wit.ai (Facebook), and Amazon Lex, which often require data to be sent to remote servers for processing.
Performance and Accuracy
Snips NLU has been benchmarked against major cloud NLU services and has shown to be as accurate or even better in slot extraction tasks, despite being faster and more lightweight. It has performed well in various benchmarks, including those published in academic studies, often ranking highest or second highest in accuracy.
Technical Capabilities
Snips NLU supports multiple built-in entities such as dates, temperatures, and numbers, with specific extractors for these entities. It also allows for custom entities and provides features like entity resolution, which can convert extracted values into standardized formats (e.g., ISO format for dates).
Extensibility and Customization
The platform allows developers to create custom entities that can be either fixed (filtering out invalid values) or automatically extensible (allowing the extraction of new values beyond the training data). This flexibility is particularly useful for applications where the range of possible inputs is vast or unpredictable.
Integration and Ecosystem
Snips NLU is part of a broader voice platform that includes wakeword detection, speech recognition (ASR), and dialog management. It integrates well with other systems, such as Home Assistant, and provides a web interface for developers to create their own voice assistants. Over 9,000 developers have used this platform to create more than 19,000 voice assistants.
Alternatives and Competitors
Dialogflow (Google)
A cloud-based NLU service that requires data to be sent to Google’s servers for processing. It is widely used but lacks the privacy features of Snips NLU.
Wit.ai (Facebook)
Another cloud-based service that allows developers to add voice interfaces to their applications. Like Dialogflow, it requires internet connectivity and does not offer the same level of privacy as Snips NLU.
Amazon Lex
Amazon’s NLU service, which is also cloud-based and requires data to be processed on Amazon’s servers. It is integrated with other AWS services but does not match Snips NLU’s privacy features.
KITT.AI
While not a direct NLU engine, KITT.AI offers services like hotword detection and offline real-time processing on embedded devices. However, it was acquired by Baidu and may not offer the same level of privacy or the comprehensive NLU capabilities as Snips.
Conclusion
In summary, Snips NLU stands out for its strong focus on privacy, high accuracy, and the ability to run entirely on local devices or servers, making it a compelling alternative to traditional cloud-based NLU solutions.

Snips NLU - Frequently Asked Questions
Here are some frequently asked questions about Snips NLU, along with detailed responses to each:
1. How do I install Snips NLU?
To install Snips NLU, you can use the Python package manager `pip`. Here is the command you need to run: “` pip install snips-nlu “` Make sure you have Python 2.7 or Python 3.5 or later installed, and that your system meets the other system requirements such as 64-bit Linux, MacOS >= 10.11, or 64-bit Windows.2. What are the system requirements for Snips NLU?
Snips NLU requires a 64-bit operating system, specifically Linux, MacOS >= 10.11, or 64-bit Windows. It also needs Python 2.7 or Python 3.5 or later. The RAM usage typically ranges between 100MB and 200MB, depending on the language and the size of the dataset.3. How do I download language resources for Snips NLU?
To use Snips NLU, you need to download the language resources for the language you are working with. You can do this using the following command: “` python -m snips_nlu download4. How do I train an NLU engine with Snips NLU?
To train an NLU engine, you first need a dataset in JSON format. You can then use the following commands to train the engine: “` snips-nlu train path/to/dataset.json path/to/output_trained_engine “` This command trains the NLU engine using the dataset and saves the trained engine to the specified output path.5. How do I use the trained NLU engine to parse sentences?
After training the engine, you can parse sentences interactively using: “` snips-nlu parse path/to/trained_engine “` This command allows you to input sentences and see the parsed intents and entities.6. Can I configure the Snips NLU engine?
Yes, you can configure the Snips NLU engine. The engine can be customized by passing a configuration object. For example, you can specify different intent parsers, language-specific configurations, and other settings. “`python nlu_engine = SnipsNLUEngine(config=CONFIG_EN) “` You can also configure the engine to use specific intent parsers and other settings as needed.7. How do I integrate Snips NLU with other platforms like Jovo?
To integrate Snips NLU with the Jovo Framework, you need to install the `@jovotech/nlu-snips` plugin and configure it in your Jovo application. “`javascript import { CorePlatform } from ‘@jovotech/platform-core’; import { SnipsNlu } from ‘@jovotech/nlu-snips’; const app = new App({ plugins: [ new CorePlatform({ plugins: [new SnipsNlu({ serverUrl: ‘http://localhost:5000/’, serverPath: ‘/engine/parse’, fallbackLanguage: ‘en’, engineId: ”, dynamicEntities: { /* … */ }, })], }), ], }); “` This integration allows you to use Snips NLU within the Jovo ecosystem.8. What is the role of dynamic entities in Snips NLU?
Dynamic entities allow you to update the NLU model with new entities dynamically. This can be particularly useful when the entities are not known beforehand. You can enable dynamic entities and configure the server path and other settings as needed. “`javascript dynamicEntities: { enabled: false, serverPath: ‘/engine/train/dynamic-entities’, passModels: true, modelsDirectory: ‘models’, models: [], }, “` This feature helps in adapting the model to new data without requiring a full retraining.9. How can I prioritize intents in Snips NLU?
You can prioritize intents by specifying the `listen.intents` property in your output template. For example: “`javascript { message: `Which city do you want to visit?`, listen: { intents: [] } } “` This ensures that the specified intent is considered as a prioritized intent when the Snips NLU is called.10. What types of intent parsers does Snips NLU use?
Snips NLU uses two main types of intent parsers: a conservative parser and a machine-learning-based parser. The conservative parser has high precision but modest recall, while the machine-learning-based parser can handle unseen utterances with good precision and recall. These parsers are used successively to ensure accurate intent parsing.
Snips NLU - Conclusion and Recommendation
Final Assessment of Snips NLU
Snips NLU is a powerful Python library focused on Natural Language Understanding (NLU), which is crucial for developing chatbots, voice assistants, and other AI-driven applications. Here’s a comprehensive assessment of its capabilities and who would benefit most from using it.
Key Capabilities
- Intent Detection and Slot Filling: Snips NLU excels at identifying the intent behind user queries and extracting relevant parameters (slots) from the text. For example, in the query “What will be the weather in Paris at 9pm?”, it can detect the intent as “searchWeatherForecast” and extract slots such as the locality (Paris) and the datetime (9pm).
- Performance and Benchmarks: Snips NLU has been benchmarked against other prominent NLU providers like API.ai (Dialogflow), Luis.ai (Microsoft), IBM Watson, and Rasa NLU. It has shown competitive performance in intent classification and slot filling, making it a reliable choice.
- Customization and Configuration: The library allows for significant customization through its API. Users can configure the NLU engine by specifying different intent parsers, including a conservative parser for high precision and a machine-learning-based parser for handling unseen utterances.
- Language Support: Snips NLU supports multiple languages, each with language-specific enhancements, making it versatile for various applications.
Who Would Benefit Most
- Developers of Chatbots and Voice Assistants: Developers working on chatbots, voice assistants, or any application requiring NLU will find Snips NLU highly beneficial. It simplifies the process of translating user input into actionable data.
- Marketers and Content Creators: Marketers can leverage Snips NLU to analyze customer feedback, social media conversations, and online reviews to better understand their audience. This can lead to more personalized and engaging content.
- Home Automation and IoT Developers: The library is particularly useful for home automation tasks, as demonstrated in the tutorial where it is used to parse queries related to lights and thermostats.
Overall Recommendation
Snips NLU is a solid choice for anyone needing to integrate NLU capabilities into their applications. Here are some key points to consider:
- Ease of Use: The library provides a straightforward API and a step-by-step guide for setup and use, making it accessible even for those new to NLU.
- Performance: Its competitive performance in benchmarks ensures that it can handle a variety of tasks with high accuracy.
- Customization: The ability to customize the engine with different parsers and configurations makes it adaptable to various use cases.
- Community and Documentation: The extensive documentation and the availability of tutorials make it easier for users to get started and troubleshoot issues.
In summary, Snips NLU is a reliable and versatile tool that can significantly enhance the capabilities of AI-driven applications, especially those requiring precise intent detection and slot filling. Its flexibility, performance, and ease of use make it a recommended choice for developers and marketers alike.