No project description provided
Project description
client.marian
A client for interacting with Marian-NMT websocket server (see MarianNMT).
How it wokrs
Grammatical Error Correction consists of 4 repositories: service.gec
, library.gec
, library.marian
, 'client.marian
:
service.gec
(QAI based REST service) importslibrary.marian
library.marian
callsservice.marian
viaclient.marian
service.marian
(C++ websocket server), fed with sentences, corrects them
In case tomorrow a better model is released...
service.gec
just instantize differentGrammar
objectlibrary.marian
just changes calls/tokenization steps to call ...service.marian
which is the main subject of change.
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.11.0.tar.gz
(3.5 kB
view details)
File details
Details for the file marian-client-0.11.0.tar.gz
.
File metadata
- Download URL: marian-client-0.11.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 648a7374b7c6325d4e46b6d012df8cf7033e328bc978ca6b0f61de27f38944af |
|
MD5 | 05f02a6f1f7384169ff3f0c31811bac2 |
|
BLAKE2b-256 | b5ed2d682fd902266a271a165d56dc9da1019b8493e49d80c40fb994bbf7a378 |