Skip to content
A rigid, lightweight, dead-simple intent parser
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add dist/ to .gitignore May 20, 2018
LICENSE Initial commit May 11, 2018 Add more thorough explanation of how Padaos works May 20, 2018 Fix space issue Mar 13, 2019 Increment version to 0.1.10 Mar 13, 2019 Fix space issue Mar 13, 2019


A rigid, lightweight, dead-simple intent parser

To deploy an intent parser into production with an automated feedback loop, it's essential that the new data doesn't interfere with the old data. It's also necessary that the parser can learn from sentences that closely match written English (or any other language). That's what Padaos does.


from padaos import IntentContainer

container = IntentContainer()
container.add_intent('hello', [
    'hello', 'hi', 'how are you', "what's up"
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')
# {'name': 'search', 'entities': {'query': 'cats', 'engine': 'xyz'}}

How it works

Padaos converts a series of example sentences into one big chunk of regex. Each intent is a single compiled regex matcher. Here's a fex examples of the input example and the output regex.

This is a test
Eat an (apple|orange).
This is something (inside parentheses)
You can’t perform that action at this time.