Repository navigation
feat: add py3langid to the benchmark - #19
Merged
Merged
Conversation
malteos
requested changes
Sep 22, 2026
Contributor
Author
|
@malteos Thanks for the review, the PR should now be OK. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add py3langid
Wrapper for py3langid 0.4.0
(pure Python + numpy, byte n-gram naive Bayes with a word table, 139 labels).
requires_preprocessing = False: the model normalizes and tokenizes raw text itself.LIDPrediction(label, posterior); the score is the normalizedprobability of the top label. Predictions below 0.25 abstain but keep
their score.
zxx(not a language) andundabstain.reach: ar→arb, sw→swh, az→azj, or→ory (the registers the model is trained
on, as in FLORES/OpenLID) and bcl→bik (macrolanguage).
Training-data disclosure
match; residual overlap is zero.
Glot500, GlotCC and GlotSparse for thin classes.
See also https://huggingface.co/datasets/commoncrawl/commonlid-results/discussions/6