Hello Curious Coders,
In this project, we are going to learn how to detect the language in text using Python with the help of libraries like long detect. This parses through the basic functions of langdetect library and is going to detect the sentence of a language.
First we imported the langdetect package Next we created a function which takes the sentence as an argument and detects the language of the sentence using detect() function of langdetect package. Later we created aa dictionary which consists of langauges and their respective codes to make sure the output looks good as the detect() function is going to return the lang codes.
Enter text: "வணக்கம்"
The language of the text is: Tamil