MENU

Fun & Interesting

Text Representation Using Bag Of n-grams: NLP Tutorial For Beginners - S2 E5

codebasics 54,083 3 years ago
Video Not Working? Fix It Now

Bag of n-grams is a text representation technique in NLP that uses a group of words to vectorize a given text. Bag of words is a particular case of bag of n-grams (with n=1). In this video, I will explain in straightforward language how bag of n-grams work along with coding in spacy and sklearn. Code: https://github.com/codebasics/nlp-tutorials/blob/main/11_bag_of_n_grams/10_bag_of_n_grams.ipynb Exercise: https://github.com/codebasics/nlp-tutorials/blob/main/11_bag_of_n_grams/bag_of_n_grams_exercise.ipynb Complete NLP Playlist: https://www.youtube.com/playlist?list=PLeo1K3hjS3uuvuAXhYjV2lMEShq2UYSwX ⭐️ Timestamps ⭐️ 00:00 Theory: What is a bag of n-grams 07:31 Coding: Bag of n-gram demo using sklearn CountVectorizer 17:06 Coding: News categories classification problem 18:50 Coding: Handle class imbalance 23:07 Coding: Train a model using raw text 32:20 Coding: Train a model using preprocessed text Practical NLP Book In India: https://www.shroffpublishers.com/books/computer-science/artificial-intelligence/natural-language-processing/9789385889189/ Practical NLP Book Link For USA: https://amzn.to/3Aoeocm Do you want to learn technology from me? Check https://codebasics.io/?utm_source=description&utm_medium=yt&utm_campaign=description&utm_id=description for my affordable video courses. 🔖Hashtags🔖 #nlp #nlptutorial #nlppython #nlptextrepresentation #nlpngram #ngramsmodels #ngrams #bigrams Need help building software or data analytics/AI solutions? My company https://www.atliq.com/ can help. Click on the Contact button on that website. 🎥 Codebasics Hindi channel: https://www.youtube.com/channel/UCTmFBhuhMibVoSfYom1uXEg #️⃣ Social Media #️⃣ 🔗 Discord: https://discord.gg/r42Kbuk 📸 Instagram: https://www.instagram.com/codebasicshub/ 🔊 Facebook: https://www.facebook.com/codebasicshub 📱 Twitter: https://twitter.com/codebasicshub 📝 Linkedin (Personal): https://www.linkedin.com/in/dhavalsays/ 📝 Linkedin (Codebasics): https://www.linkedin.com/company/codebasics/ 🔗 Patreon: https://www.patreon.com/codebasics?fan_landing=true

Comment