Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Padacioso

A lightweight, dead-simple intent parser

Built on top of simplematch, inspired by Padaos

Example

from padacioso import IntentContainer

container = IntentContainer()

## samples
container.add_intent('hello', ['hello', 'hi', 'how are you', "what's up"])

## "optionally" syntax
container.add_intent('hello world', ["hello [world]"])

## "one_of" syntax
container.add_intent('greeting', ["(hi|hey|hello)"])

## entity extraction
container.add_intent('buy', [
    'buy {item}', 'purchase {item}', 'get {item}', 'get {item} for me'
])
container.add_intent('search', [
    'search for {query} on {engine}', 'using {engine} (search|look) for {query}',
    'find {query} (with|using) {engine}'
])
container.add_entity('engine', ['abc', 'xyz'])
container.calc_intent('find cats using xyz')
# {'conf': 1.0, 'name': 'search', 'entities': {'query': 'cats', 'engine': 'xyz'}}

## wildcards syntax
container.add_intent('say', ["say *"])
container.calc_intent('say something, whatever')
# {'conf': 0.85, 'entities': {}, 'name': 'test'}

## typed entities syntax
container.add_intent('pick_number', ['* number {number:int}'])
container.calc_intent('i want number 3')
# {'conf': 0.85, 'entities': {'number': 3}, 'name': 'pick_number'})

Download files

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

Source Distribution

padacioso-2.2.5a2.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

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

padacioso-2.2.5a2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file padacioso-2.2.5a2.tar.gz.

File metadata

  • Download URL: padacioso-2.2.5a2.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for padacioso-2.2.5a2.tar.gz
Algorithm Hash digest
SHA256 e8c9e6d73abe726cc1af01405fb90c326446f187e6b61a13e40a16d309fa4f96
MD5 3e7f157391ca1fb2905a5a96d7b8727a
BLAKE2b-256 c6e25dfd4d536f995c0c801c85d312b11a75c55d3e6fbbbeb5eaf3a60aafb3dc

See more details on using hashes here.

File details

Details for the file padacioso-2.2.5a2-py3-none-any.whl.

File metadata

  • Download URL: padacioso-2.2.5a2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for padacioso-2.2.5a2-py3-none-any.whl
Algorithm Hash digest
SHA256 736128604620259412cef6056f2422865db7c04fa9cffc4c4bf243d8a7438bf5
MD5 b5547a3ce3c9e38bc5388d50fb78c222
BLAKE2b-256 502d56b562a657a92f7abea308801a2c71655e0c6098d1893b4954405afb882c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.2.5a2 This release

2 files

1.0.0

2 files

0.2.4

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

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