mesolitica/language-detection-dataset
Viewer • Updated • 16.8M • 376 • 1
FastText model to classify standard English and local English.
from huggingface_hub import hf_hub_download
import fasttext
filename = hf_hub_download(
repo_id="mesolitica/fasttext-language-detection-en",
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__other'),
array([0.85033566, 0.09981849, 0.04988486]))