Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/farizrahman4u/eywa
Open source framework for building conversational agents [WIP]
https://github.com/farizrahman4u/eywa
Last synced: 23 days ago
JSON representation
Open source framework for building conversational agents [WIP]
- Host: GitHub
- URL: https://github.com/farizrahman4u/eywa
- Owner: farizrahman4u
- License: gpl-3.0
- Created: 2018-01-29T23:57:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T19:35:15.000Z (over 3 years ago)
- Last Synced: 2024-10-08T10:25:08.069Z (about 1 month ago)
- Language: Python
- Size: 313 KB
- Stars: 26
- Watchers: 9
- Forks: 15
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eywa - Framework for Conversational Agents
[![Build Status](https://travis-ci.org/farizrahman4u/eywa.svg?branch=master)](https://travis-ci.org/farizrahman4u/eywa)
Eywa is an open source framework for building and deploying conversational agents (aka chatbots).
#### Features:
* Requires only few samples for training
* Instant retraining
* Uses word embeddings + heuristics instead of deep learning (better debuggability and interpretability)## Quickstart
### Classifier```python
from eywa.nlu import Classifierx_hotel = ['book a hotel', 'need a nice place to stay', 'any motels near by']
x_weather = ['what is the weather like', 'is it hot outside']clf = Classifier()
clf.fit(x_hotel, 'hotel')
clf.fit(x_weather, 'weather')print(clf.predict('will it rain today')) # >>> 'weather'
print(clf.predict('find a place to stay')) # >>> 'hotel'
```### Entity extractor
```python
from eywa.nlu import EntityExtractorx = ['what is the weather in tokyo', 'what is the weather', 'what is the weather like in kochi']
y = [{'intent': 'weather', 'place': 'tokyo'}, {'intent': 'weather', 'place': 'here'}, {'intent': 'weather', 'place': 'kochi'}]ex = EntityExtractor()
ex.fit(x, y)x_test = 'what is the weather in london like'
print(ex.predict(x_test))
```### Pattern
```python
from eywa.nlu import Patternp = Pattern('[fruit: apple, banana] is my favourite fruit') # create variable [fruit] with sample values {apple, banana}
p('i like grapes') # >> {'fruit' : 'grapes'}
```### Requirements
* Python 3.6 or higher
* Eywa requires [Tensorflow 2.0](https://www.tensorflow.org/install/pip) and should be installed manually by the user (is not installed automatically as a dependency)## Installation
### Via pip:
`pip install eywa`
### Install from source:
```
git clone https://www.github.com/farizrahman4u/eywa.git
cd eywa
python setup.py install
```