cis-lmu/glotlid-corpus
Viewer • Updated • 311M • 183 • 13
How to use lopatnov/glotlid with fastText:
from huggingface_hub import hf_hub_download
import fasttext
model = fasttext.load_model(hf_hub_download("lopatnov/glotlid", "model.bin"))This repository contains GlotLID models for the Lopatnov.Translate service. These files are mirrors of the original models from the cis-lmu/glotlid repository.
To configure model for the service, please modify appsettings.json:
{
"Models": {
"glotlid": {
"Type": "FastText",
"LabelFormat": "iso639-3", // GlotLID outputs ISO 639-3 codes
"LabelPrefix": "__label__",
"Path": "../../models/detect-lang/glotlid/model_v3.bin"
}
},
"Translation": {
"AutoDetect": "glotlid"
}
}
Note: Make sure the Path correctly points to the location of your downloaded .bin files relative to application.
For advanced configuration options, visit the Official Documentation.