No project description provided
Project description
client.marian
A client for interacting with Marian-NMT websocket server (see MarianNMT).
Usage
from marian_client import MarianClient
host = "0.0.0.0"
port = "5000"
mc = MarianClient(PORT=port, HOST=host)
tokenized_sentence = "Alice like cats ."
success, corrected_sentence, error_info = mc(tokenized_sentence)
if success:
print(corrected_sentence)
else:
print(f"Call to MarianClient failed with error code {error_info[0]} and message {error_info[1]}")
Installation
pip install marian-client
License
Unlicensed.
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 Distribution
marian-client-0.1.0.tar.gz
(2.2 kB
view details)
File details
Details for the file marian-client-0.1.0.tar.gz
.
File metadata
- Download URL: marian-client-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad136157f9c82ff9a68f36af2c0ad3e0e8ab8516a6bed6cba7108c87f89fce6 |
|
MD5 | 6a533bfcd1a11a7cd69598e5d2d74f5f |
|
BLAKE2b-256 | fb66cf2f3498835ed29e4efb32f47b8b856aa73e0078c820bbd117c42186f17e |