https://github.com/mycroftai/padatious
A neural network intent parser
https://github.com/mycroftai/padatious
intent intent-classification language-detection language-processing text-analysis text-processing
Last synced: 17 days ago
JSON representation
A neural network intent parser
- Host: GitHub
- URL: https://github.com/mycroftai/padatious
- Owner: MycroftAI
- License: apache-2.0
- Created: 2017-07-31T22:41:03.000Z (over 7 years ago)
- Default Branch: dev
- Last Pushed: 2021-11-10T00:47:30.000Z (over 3 years ago)
- Last Synced: 2025-03-29T06:05:45.667Z (24 days ago)
- Topics: intent, intent-classification, language-detection, language-processing, text-analysis, text-processing
- Language: Python
- Homepage: http://padatious.readthedocs.io
- Size: 97.7 KB
- Stars: 161
- Watchers: 18
- Forks: 39
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](LICENSE.md) [](https://mycroft.ai/cla) [](https://github.com/MycroftAI/contributors/blob/master/team/Mycroft%20Core.md) 
[](http://makeapullrequest.com)
[](https://chat.mycroft.ai/community/channels/machine-learning)# Padatious
An efficient and agile neural network intent parser. Padatious is a core component of [Mycroft AI](https://mycroft.ai).
## Features
- Intents are easy to create
- Requires a relatively small amount of data
- Intents run independent of each other
- Easily extract entities (ie. Find the nearest *gas station* -> `place: gas station`)
- Fast training with a modular approach to neural networks## Getting Started
### Installing
Padatious requires the following native packages to be installed:
- [`FANN`][fann] (with dev headers)
- Python development headers
- `pip3`
- `swig`Ubuntu:
```
sudo apt-get install libfann-dev python3-dev python3-pip swig libfann-dev python3-fann2
```Next, install Padatious via `pip3`:
```
pip3 install padatious
```
Padatious also works in Python 2 if you are unable to upgrade.[fann]:https://github.com/libfann/fann
### Example
Here's a simple example of how to use Padatious:
#### program.py
```Python
from padatious import IntentContainercontainer = IntentContainer('intent_cache')
container.add_intent('hello', ['Hi there!', 'Hello.'])
container.add_intent('goodbye', ['See you!', 'Goodbye!'])
container.add_intent('search', ['Search for {query} (using|on) {engine}.'])
container.train()print(container.calc_intent('Hello there!'))
print(container.calc_intent('Search for cats on CatTube.'))container.remove_intent('goodbye')
```Run with:
```bash
python3 program.py
```## Learn More
Further documentation can be found at https://mycroft.ai/documentation/padatious/