Loading project…
Loading project…
I turned 22,000 sentences in 22 languages into word counts and trained multinomial naive Bayes, which scored 95.3% on a 20% test split. A Hindi sentence I typed came back as Hindi.
Original tutorial by Aman Kharwal: Language Detection (opens in a new tab)
| Output | Value | Cell # |
|---|---|---|
| Test accuracy (multinomial naive Bayes) | 95.3% | |
| Languages | 22 |
Cell # counts every cell from the top of the notebook, Markdown included, starting at 1.
A balanced table of 1,000 sentences per language from the tutorial author's data repository.