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.3.tar.gz (42.1 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.3-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for intently_nlu-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e91470de4e6e03ed4de804e16689acbf587c46705c12d108fc7793352a2f7d9b
MD5 1ba9b6b86aa05068ac695d3c8a0d9f05
BLAKE2b-256 32cf681240554c95988b25a739def32a0b14442232421357db1d8a46702a19e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: intently_nlu-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 44.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3f635ef8a7a9af22b0f92ff501eaa7d77a84fb39f433f5ee13dd3e5f20f5380a
MD5 ec27315ac92893811be73db3a0fd4b2b
BLAKE2b-256 79da0fa1e1ff64dcf96fad32ada3fef960603453040b2588fa0c0645d01e2e08

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