What is this?
baikalai-apis is the generated python classes of GRPC API for baikal.ai.
The baikal.ai provides several service for deep learning NLP features. This api has all of main features, which provides tokenizing, POS tagging for Korean. It has also customized dictionary service.
How to install
pip3 install baikalai-apis
How to use
- You can create your own baikal language service client.
- It is used for
baikal-nlpy, the official bailal NLP package for python.
from google.protobuf.json_format import MessageToDict
import baikal.language.language_service_pb2 as pb
import baikal.language.language_service_pb2_grpc as ls
MAX_MESSAGE_LENGTH = 100*1024*1024
class BaikalLanguageServiceClient:
stub = None
def __init__(self, remote):
channel = grpc.insecure_channel(
remote,
options=[
('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),
('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH),
])
self.stub = ls.LanguageServiceStub(channel)
def analyze_syntax(self, document, auto_split=False):
req = pb.AnalyzeSyntaxRequest()
req.document.content = document
req.document.language = "ko_KR"
req.encoding_type = pb.EncodingType.UTF32
req.auto_split_sentence = auto_split
res = self.stub.AnalyzeSyntax(req)
# print_syntax_as_json(res)
return res
def print_syntax_as_json(res: pb.AnalyzeSyntaxResponse, logf=sys.stdout):
d = MessageToDict(res)
import json
json_str = json.dumps(d, ensure_ascii=False, indent=2)
logf.write(json_str)
logf.write('\n')
Metadata
Release files for baikalai-apis 0.9.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 | Provenance | Actions |
|---|---|---|---|---|
| baikalai-apis-0.9.1.tar.gz | 26.6 kB | Without provenance | Details for baikalai-apis-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baikalai_apis-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for baikalai_apis-0.9.1-py3-none-any.whl |
Total release size: 56.7 kB
Release files / baikalai-apis-0.9.1.tar.gz
| Download URL | baikalai-apis-0.9.1.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64b3990c0952c5669b58b90cf32aa16dd6b9e576bc8f5c9bcd604e1dd7c2347a
|
|
BLAKE2b-256 checksum How to use checksums |
276e81baffd0b223ab284b3c072d67b7a2e7a9f7d9f8c24d59376903d728cc11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.5 Linux/4.15.0-156-generic
|
Release files / baikalai_apis-0.9.1-py3-none-any.whl
| Download URL | baikalai_apis-0.9.1-py3-none-any.whl |
|---|---|
| Size | 30.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e287ca8350eab53846c705e69fb8e3410946636e8e78dc7f9fb0b1849f01a8ed
|
|
BLAKE2b-256 checksum How to use checksums |
2725109812b7eb584757e4f3dd576510335eff5a5315dd2767589de079b1220c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.5 Linux/4.15.0-156-generic
|
Security for baikalai-apis 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.