Skip to main content

hornbill python client and util

Project description

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
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hornbill4p, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size hornbill4p-0.1.1.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page