Translate

Tuesday, August 24, 2021

Language Detection using Python


Language detection is an important functionality in Natural Language Processing (NLP) as Language detection is the basic pre-processing task that you perform. In the previous article, we discussed how language detection can be done using Azure Machine Learning. 

Let us do the same task for same dateset using python. Language Detection.ipynb - Colaboratory will provide the entire python code and let us understand the code step by step. 

First let us import the relevant libraries. 

!pip install textblob polyglot spacy spacy_cld langdetect langid 

Let us add the sample code with different languages. 


Following code will detect the language and display  the language code.
 

One of the important task in language detection is detecting the required language. Following simple query will display the English texts.
 


No comments:

Post a Comment