fasttext-language-detection-v2
FastText model to classify standard English, Local English, standard Malay, social media Indonesian, local Malay and others.
how to use
from huggingface_hub import hf_hub_download
import fasttext
filename = hf_hub_download(
repo_id="mesolitica/fasttext-language-detection-v2",
filename="fasttext.ftz"
)
lang_model = fasttext.load_model(filename)
lang_model.predict('hello my name', k = 10)
Output,
(('__label__standard-english',
'__label__local-english',
'__label__standard-malay',
'__label__socialmedia-indonesian',
'__label__local-malay',
'__label__other'),
array([9.12180483e-01, 4.69220504e-02, 4.03920077e-02, 5.50693308e-04,
1.30474637e-05, 1.07987826e-05]))
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support