Skip to main content

Python library to extract intention and structured information from sentences written in natural language.

Project description

Intently NLU

PyPI - Version PyPI - Python Version

Intently NLU is a Python library that allows to extract the intention and structured information from sentences written in natural language.

Table of Contents

State

Currently in phase 2: Pre-Alpha The library may work, but is not ready for production.

About

Behind every chatbot and voice assistant lies a common piece of technology: Natural Language Understanding (NLU). Anytime a user interacts with an assistant using natural language, their words need to be translated into a machine-readable description of what they meant.

The NLU engine first detects what the intention of the user is (a.k.a. intent), then extracts the parameters (called slots) of the query. The developer can then use this to determine the appropriate action or response.

Let’s take an example to illustrate this, and consider the following sentence:

"What will be the weather in berlin at 9pm?"

Properly trained, the Intently NLU engine will be able to extract structured data such as:

{
  "intent": "weather/intents/searchWeatherForecast",
  "probability": 0.95,
  "raw_utterance": "What will be the weather in berlin at 9pm?",
  "resolved_slots": {
    "locality": "berlin",
    "forecast_start_datetime": "9pm"
  }
}

In this case, the identified intent is weather/intents/searchWeatherForecast and two slots were extracted, a locality and a time.

This library is highly inspired by and forked from Snips NLU, although large parts of the library have been completely rewritten or restructured. Therefore, not all functionality of Snips NLU is available in the same way, some are even missing completely.

The motivation of this project is to create a robust, fast and easy-to-use nlu library similar to Snips NLU with support for newer Python versions or tools, since Snips NLU has not been updated for a long time.

Getting Started

See the Quick Start Guide for more information on how to get started with Intently NLU.

Sample datasets

Here is a list of some datasets that can be used to train am Intently NLU engine:

  • Smarthome dataset: "Set the temperature to 18 degrees in the bedroom", "Turn off the lights in the living room"

Documentation

The documentation can be found here.

Contributing

You can contribute to this project by submitting issues, creating pull requests or improving the documentation.

License

The whole library is built using many concepts from Snips NLU, which is licensed under Apache License, Version 2.0. The library itself is licensed under Apache License, Version 2.0 too.

intently-nlu is provided as Open Source software. See LICENSE and NOTICE for more information.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intently_nlu-0.0.2.tar.gz (41.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intently_nlu-0.0.2-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file intently_nlu-0.0.2.tar.gz.

File metadata

  • Download URL: intently_nlu-0.0.2.tar.gz
  • Upload date:
  • Size: 41.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for intently_nlu-0.0.2.tar.gz
Algorithm Hash digest
SHA256 18a48ed26f3a9d7ea6a112314dd0d1fd674c1236c16c625de4dccfb19ed01812
MD5 b3b6812c9c1dd98d32b55772d79518bd
BLAKE2b-256 e8e18d781c416f4ad1e4b848ad2ac4d696cbc2dafe143a05029e7b49e7867c97

See more details on using hashes here.

File details

Details for the file intently_nlu-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: intently_nlu-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 44.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for intently_nlu-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 287e1cb28baeb7f2ed03c13b34a52a656209cd0863c09e696b01648e0894bcb2
MD5 b055b4746899c04be823c89909e4e1b5
BLAKE2b-256 4ae2e080f34db74955f6acc78cef853ce7b1f95d2ccb6a35a864e5406275eabb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page