Yoctol Natural Language Understanding SDK
Project description
# yoctol-nlu-py
[![Build Status](https://travis-ci.org/Yoctol/yoctol-nlu-py.svg?branch=master)](https://travis-ci.org/Yoctol/yoctol-nlu-py)
[![PyPI version](https://badge.fury.io/py/yoctol-nlu.svg)](https://badge.fury.io/py/yoctol-nlu)
Yoctol Natural Language Understanding SDK for python.
## Install
Use Python3
```
pip install yoctol-nlu
```
## Usage
### Intent Classifier Service
For existing classifier:
```python
from ynlu import NLUClient
client = NLUClient(token='YOUR_TOKEN_HERE')
# Get all possible clf ids
ids = client.get_all_available_clf_ids()
print(ids)
# Get model by id
model = client.get_model_by_id(ids[0])
# Predict
intent_result, entity_result = model.predict('飲料喝到飽')
# Also could get the clf by clf's name
# Get all possible clf names
names = clf.get_all_available_clf_names()
print(names)
# Get model by name
model = client.get_model_by_name(names[0])
# Predict
intent_result, entity_result = model.predict('飲料喝到飽')
```
[![Build Status](https://travis-ci.org/Yoctol/yoctol-nlu-py.svg?branch=master)](https://travis-ci.org/Yoctol/yoctol-nlu-py)
[![PyPI version](https://badge.fury.io/py/yoctol-nlu.svg)](https://badge.fury.io/py/yoctol-nlu)
Yoctol Natural Language Understanding SDK for python.
## Install
Use Python3
```
pip install yoctol-nlu
```
## Usage
### Intent Classifier Service
For existing classifier:
```python
from ynlu import NLUClient
client = NLUClient(token='YOUR_TOKEN_HERE')
# Get all possible clf ids
ids = client.get_all_available_clf_ids()
print(ids)
# Get model by id
model = client.get_model_by_id(ids[0])
# Predict
intent_result, entity_result = model.predict('飲料喝到飽')
# Also could get the clf by clf's name
# Get all possible clf names
names = clf.get_all_available_clf_names()
print(names)
# Get model by name
model = client.get_model_by_name(names[0])
# Predict
intent_result, entity_result = model.predict('飲料喝到飽')
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
yoctol_nlu-0.5.0-py3-none-any.whl
(19.8 kB
view hashes)
Close
Hashes for yoctol_nlu-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f45df5c086271f93a6426817f20de0235af4a723ec2afefdf4c75f4d09d04c4 |
|
MD5 | b78011e362d56dd0ff22ee79c7271c22 |
|
BLAKE2b-256 | 88b8726ee5f650e6ebb3ff485f98e2bce391b94cd74179f81d5fd869403e308d |