legacy-datasets/wikipedia
Updated • 126k • 650
How to use lopatnov/fasttext-language-id with fastText:
from huggingface_hub import hf_hub_download
import fasttext
model = fasttext.load_model(hf_hub_download("lopatnov/fasttext-language-id", "model.bin"))This repository contains LID-176 models for the Lopatnov.Translate service. These files are mirrors of the original models from the julien-c/fasttext-language-id repository. You can also download the official models directly from https://fasttext.cc/docs/en/language-identification.html
To configure model for the service, please modify appsettings.json:
{
"Models": {
"lid-176-bin": {
"Type": "FastText",
"LabelFormat": "iso639-1", // LID-176 outputs ISO 639-1 codes (en, de, fr, etc.)
"LabelPrefix": "__label__",
"Path": "../../models/detect-lang/fasttext-language-id/lid.176.bin" // .ftz and .bin formats are both supported
},
},
"Translation": {
"AutoDetect": "lid-176-bin"
}
}
Note: Make sure the Path correctly points to the location of your downloaded .bin or .ftz files relative to application.
For advanced configuration options, visit the Official Documentation.