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.3a1.tar.gz
(32.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file padacioso-2.2.3a1.tar.gz.
File metadata
- Download URL: padacioso-2.2.3a1.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bb731c1a57079275063f7ba632924b08123c885d49ac2dba165ae256e154603
|
|
| MD5 |
9910d62d05c36d1630b1e29dac9fedd3
|
|
| BLAKE2b-256 |
f82dbb19512b2b2bdbbf6cbd4f48f16df2e584787442156012ec1dc62615d812
|
File details
Details for the file padacioso-2.2.3a1-py3-none-any.whl.
File metadata
- Download URL: padacioso-2.2.3a1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04e6893dce31cf17e8417fa1aa2b69f490f2a1015710cb43aacd4aee0d90a930
|
|
| MD5 |
bc194f4b6e6c898b4f58fdc90df89000
|
|
| BLAKE2b-256 |
b82b2cd422dff2bec31718756d60205b5ab7d73e5d9659f6e13f213ea54352cf
|