Change language

Language Identification | NLP | Machine Learning | Python | sklearn | naive bayes | multinomialnb

Language Identification  | NLP | Machine Learning | Python | sklearn | naive bayes  | multinomialnb

section using natural language processing we are using the language detection data set which contains text details for 17  different languages the languages are using the text we have to create a  model which will be able to predict the given language this is a solution for  many artificial intelligence applications and computational linkage these kinds  of prediction systems are widely used in electronic devices such as mobiles  laptops etc for machine translation and also on robots it helps in tracking  and identifying multilingual documents too as discussed let us you know extend or expand  our document classifier to the next level we need to classify any type of  document from any language thats the uh thats what we are planning now  first we need to identify the language after that we can repeat the same process  to summarize the document by using the same algorithms so now i am showing you how  to identify the language it is given let me run the piece of code i have imported the libraries as discussed  this is a csv file which contains around 17 languages i have already explained that its a data frame here so the data it is  stored in a data frame from the csv file after that i am checking what are all  the languages its there in the csv file it contains english french  spanish portuguese dutch arabic german tamil canada greek hindi all these  languages are there around 17 languages we have the input variable and the output  variable that is the dependent variable and the independent variable now i am doing  the label encoding you can see it here after that i have created a data list and i am removing unwanted characters thats  the pre-processing we have done the same thing in the document classifier there we  have used the method from the gensim library here i am using regular expressions  after that we are getting into the sk learn you know feature extraction  by using the count vectorizer and now we are splitting the dataset the same process  in the document class classifier whatever we have done the training and the testing data  set now here i am using the multinomial nb from the name base that is the algorithm  i am using i am you know training the model lets wait for some time oh its done now the y underscore predict im printing the values  here you can see the values now i am getting the you know accuracy score and confusion  metrics the accuracy is 97 percentage and the heat map it is printed here now i am writing  a predict method here i will pass the language and from this method i can you know predict see here  i have entered tamil so it is predicting it as thumbnail let me include some other language  let me include some arabic text from google lets see how it works yeah this is i think it is arabic text let me see it yeah this is arabic let me copy from here and  after that i will put it here let me put it here i am pasting it some text we are pasting  it is the arabic lets see the result the language is in arabic lets  and some other language as well lets lets see we have done tamil  now lets do some hindi in the text let me put some hindi text  as well so this is hindi let me put it here yeah let me paste it here we need to paste it from left sorry right to  left thats what yeah but it is one second okay it is im trying to delete it just  one second and give it just one second delete yeah it is deleted now i have  put some hindi text let me put it here here we need to predict  it after that lets predict it the language is in hindi you  can see it here so what is our

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

Common xlabel/ylabel for matplotlib subplots

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

12 answers

NUMPYNUMPY

Flake8: Ignore specific warning for entire file

12 answers

NUMPYNUMPY

glob exclude pattern

12 answers

NUMPYNUMPY

How to avoid HTTP error 429 (Too Many Requests) python

12 answers

NUMPYNUMPY

Python CSV error: line contains NULL byte

12 answers

NUMPYNUMPY

csv.Error: iterator should return strings, not bytes

12 answers

News


Wiki

Python | How to copy data from one Excel sheet to another

Common xlabel/ylabel for matplotlib subplots

Check if one list is a subset of another in Python

sin

How to specify multiple return types using type-hints

exp

Printing words vertically in Python

exp

Python Extract words from a given string

Cyclic redundancy check in Python

Finding mean, median, mode in Python without libraries

cos

Python add suffix / add prefix to strings in a list

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

Python - Move item to the end of the list

Python - Print list vertically