python client for hornbill
test in python3.6
# use case:
## classify
```python
import hornbill4p
host = 'algorithm3'
port = 50051
client = hornbill4p.HornbillRpcClient(host, port)
res = client.classify("是个宝宝儿", ["ADTWT"])
print(res)
```
```bash
> ADTWT$1
```
## batch_classify
```python
import hornbill4p
host = 'algorithm3'
port = 50051
client = hornbill4p.HornbillRpcClient(host, port)
res = client.batch_classify(["是个宝宝儿", "是个宝宝儿"], ["ADTWT"])
for i in res:
print(i)
```
```bash
> ADTWT$1
> ADTWT$1
```
# install
```bash
git clone https://git.datatub.com/hornbill/hornbill4p.git
```
```bash
pip install -r requirements.txt
python setup.py install
```
test in python3.6
# use case:
## classify
```python
import hornbill4p
host = 'algorithm3'
port = 50051
client = hornbill4p.HornbillRpcClient(host, port)
res = client.classify("是个宝宝儿", ["ADTWT"])
print(res)
```
```bash
> ADTWT$1
```
## batch_classify
```python
import hornbill4p
host = 'algorithm3'
port = 50051
client = hornbill4p.HornbillRpcClient(host, port)
res = client.batch_classify(["是个宝宝儿", "是个宝宝儿"], ["ADTWT"])
for i in res:
print(i)
```
```bash
> ADTWT$1
> ADTWT$1
```
# install
```bash
git clone https://git.datatub.com/hornbill/hornbill4p.git
```
```bash
pip install -r requirements.txt
python setup.py install
```
Release files for hornbill4p 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hornbill4p-0.1.1.tar.gz | 5.1 kB | Details |
Release files / hornbill4p-0.1.1.tar.gz
| Download URL | hornbill4p-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08533904b136f4c1d0711b60361b224f81920e4a5969b991945aebb6e830a4d1
|
|
BLAKE2b-256 checksum How to use checksums |
8438f94f660b1fea92ce622e1ceaa7e927929e1e4eca36410eb1d0e3a2aa704b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |