Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
translation-quality-estimator
Advanced tools
Translation Quality Estimator is a simple but powerful way of estimating the quality of translations in over a hundred languages. It takes two lists of strings as input and returns the cosine similarity scores between their embeddings.
The approach focuses on generating language agnostic state-of-the-art 🤗 transformer embeddings for the list of string pairs (provided as an input) and measures performance by calculating the cosine similarity between the embeddings. The similarity scores range between [0, 1] with higher referring to better quality of translations.
The aim of this project is to create a quick and easy method for estimating the quality of translation of strings.
PyTorch 1.2.0 or higher is recommended. If the install below gives an error, please install pytorch first here.
Installation can be done using pypi
pip install translation-quality-estimator
The most minimal example can be seen below for translation quality estimation between two lists of strings:
from tqe import TQE
lang_1 = ["what are you doing", "what is your name"]
lang_2 = ["तुम क्या कर रहे हो", "तुम्हारा नाम क्या है"]
model = TQE('LaBSE')
cos_sim_values = model.fit(lang_1, lang_2)
print(cos_sim_values)
NOTE: For a full overview of all possible multi-lingual transformer models see sentence-transformer.
I would advise using 'LaBSE'
but you can also test out any 'XLM-R'
or 'Multilingual-BERT'
based models.
FAQs
To estimate the quality of translation
We found that translation-quality-estimator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.