How To Create A Word Cloud In Python | Tutorial [EASY] 💻

  Рет қаралды 46,039

Coding Is Fun

Coding Is Fun

Күн бұрын

Пікірлер: 70
@veenashetty3118
@veenashetty3118 11 ай бұрын
Very Easy Excellent way of getting the Word Cloud , thanks much from India , Bengaluru
@CodingIsFun
@CodingIsFun 11 ай бұрын
Glad you liked it! Greetings to Bengaluru! :)
@AlfredoAntonioMartinez
@AlfredoAntonioMartinez 7 ай бұрын
Excelente tutorial! Muchísimas gracias!
@CodingIsFun
@CodingIsFun 7 ай бұрын
Glad you liked it. Thanks for watching. Cheers, Sven ✌️
@jonasvw
@jonasvw 3 жыл бұрын
Thanks for this short tutorial! :)
@CodingIsFun
@CodingIsFun 3 жыл бұрын
Glad you liked it :)
@CaribouDataScience
@CaribouDataScience 2 жыл бұрын
Thanks, that was easy!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Glad you liked it. Thanks for watching.
@OscarHernandez-ul5go
@OscarHernandez-ul5go 3 жыл бұрын
Thank you very much for your tutorials, they are very helpful, greetings from mexico
@CodingIsFun
@CodingIsFun 3 жыл бұрын
Thank you Oscar Hernández, I'm happy to hear that you've been finding the videos useful. Thanks for taking the time to leave a comment and for watching! Greeting to Mexico :)
@lsborba1
@lsborba1 2 жыл бұрын
Quite useful!! Congrats!!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks!
@sitrakaforler8696
@sitrakaforler8696 Жыл бұрын
Great tutorial ! Thanks very much !!!!
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching! Glad it was helpful! :)
@queencarolas
@queencarolas 2 жыл бұрын
Thank you! =) Great tutorial.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Glad you liked it. Thanks for watching! :)
@PratapO7O1
@PratapO7O1 3 жыл бұрын
Thank you this was helpful
@CodingIsFun
@CodingIsFun 3 жыл бұрын
A pleasure! Thanks for watching the video :)
@artistheanswer
@artistheanswer 3 жыл бұрын
that's cool. many thanks!
@CodingIsFun
@CodingIsFun 3 жыл бұрын
Thanks! Glad you liked it :)
@bunnybaghi9989
@bunnybaghi9989 3 жыл бұрын
I was unable to install wordcloud in visual studio code please help me sir
@CodingIsFun
@CodingIsFun 3 жыл бұрын
What kind of error message did you get?
@bunnybaghi9989
@bunnybaghi9989 3 жыл бұрын
@@CodingIsFun " unable to find wheel "
@CodingIsFun
@CodingIsFun 3 жыл бұрын
@@bunnybaghi9989 Could you please try the following: 1) Download the .whl file compatible with your Python version and your windows distribution (32bit or 64bit) from here: www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud 2) cd to the file path 3) Run this command python -m pip install OR, If you are using Anaconda, please enter the following in the Anaconda Prompt: conda install -c conda.anaconda.org/conda-forge wordcloud Hope it helps 🙏
@sarvarbek8142
@sarvarbek8142 3 жыл бұрын
which compiler are you using?
@CodingIsFun
@CodingIsFun 3 жыл бұрын
I am not quite sure if I understand your questions correctly, but the Library 'Wordcloud' depends on Matplotlib to generate & export the image.
@sarvarbek8142
@sarvarbek8142 3 жыл бұрын
@@CodingIsFun Oh, sorry for the wrong question. I am just using my command prompt and can not run the script. So I thought maybe it is because of the compiler or translator. compiler says: Traceback (most recent call last): File "C:\Users\sarvar\Desktop\Wordcloud_Tutorial\wordcloud_example.py", line 2, in from wordcloud import WordCloud, STOPWORDS ModuleNotFoundError: No module named 'wordcloud'
@CodingIsFun
@CodingIsFun 3 жыл бұрын
@@sarvarbek8142 Could you kindly check if you have installed the required libraries (0:28 min)? It looks like, that you do not have 'wordcloud' installed. If you still get an error, please let me know. Cheers, Sven
@EstherMaryTadius
@EstherMaryTadius Жыл бұрын
Hi, can you teach how to generate wordcloud but using Trigram?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and your suggestion.
@Sancarlo76
@Sancarlo76 2 жыл бұрын
Hi, noob question, why do you have to import the same packages two times? Thanks!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching. Within the wordcloud module, I am importing the WordCloud class. You could also import all classes using "import wordcloud", then you could write: wc = wordcloud.WordCloud(background_color="white", stopwords=stopwords, height=600, width=400) I hope it helps!
@plamenyankov8476
@plamenyankov8476 3 жыл бұрын
Cheers! Thank you very much for the useful tutorial!!! Could somebody advise me how to make it work with some text in cyrilic. Many thanks in advance.
@CodingIsFun
@CodingIsFun 3 жыл бұрын
Thank you very much. I tried it out. For me, it is also working with Cyrillic (see sample code below). Alternatively, you could also install a font on your machine (which supports Cyrillic) and specify the path under "font_path". Let me know if that does not work for you. Cheers, Sven CODE BELOW 👇 --------------------------------------------------------------------------------------- import matplotlib.pyplot as plt from wordcloud import WordCloud, STOPWORDS # Read text text = """Статья 1 Все люди рождаются свободными и равными в своем достоинстве и правах. Они наделены разумом и совестью и должны поступать в отношении друг друга в духе братства.""" stopwords = STOPWORDS wc = WordCloud( background_color='white', stopwords=stopwords, # font_path='/Library/Fonts/NotoSansCJKjp-Light.otf', height = 600, width=400 ) wc.generate(text) # store to file wc.to_file('wordcloud_output.png')
@KanhaiyaLal-ze3ri
@KanhaiyaLal-ze3ri Жыл бұрын
Hi Coding fun, when i am chaging my extention name of my txt file to py it is not convering as you. could you explain it in another video. Thanks
@CodingIsFun
@CodingIsFun Жыл бұрын
To convert a .txt file to a .py file, you need to: Open the .txt file in a text editor such as Notepad or Sublime Text. Write or copy Python code into the file. Save the file with a .py file extension.
@KanhaiyaLal-ze3ri
@KanhaiyaLal-ze3ri Жыл бұрын
@@CodingIsFun Thanks for replying me i will try my best.
@maxparsons9431
@maxparsons9431 Жыл бұрын
I have the word cloud down, but I am attempting to do a list of names and wish for the first and last names to stay by each other even though there is a space, is that possible?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. One possible solution I could think of is the following: from pathlib import Path import matplotlib.pyplot as plt from wordcloud import STOPWORDS, WordCloud TXT_FILE = Path.cwd() / "jeff_bezos_speech.txt" # Read text text = open(TXT_FILE, mode="r", encoding="utf-8").read() # List of names (modify this with the names you are looking for) names = ['Jeff Bezos', 'Elon Musk', 'Bill Gates'] # Replace spaces in names with underscores for name in names: text = text.replace(name, name.replace(' ', '_')) stopwords = STOPWORDS wc = WordCloud(background_color="white", stopwords=stopwords, height=600, width=400) wc.generate(text) # store to file wc.to_file("wordcloud_output.png") I hope it helps!
@maxparsons9431
@maxparsons9431 Жыл бұрын
@@CodingIsFun thank you! is it possible for a wordcloud to use multiple fonts, like the words have a randomized chance on which font they use?
@CodingIsFun
@CodingIsFun Жыл бұрын
@@maxparsons9431 Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!
@dashvogel7212
@dashvogel7212 2 жыл бұрын
Hi, nice tutorial. :D Is it possible to add an transparent background?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks! Here you are: wc = WordCloud(mode = "RGBA", background_color=None, height=600, width=400)
@NambarameyDy-BRR
@NambarameyDy-BRR 8 ай бұрын
it didn't work for me in command prompt. what software do I first need for Windows?
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks for watching. You need to have Python installed on your machine. Cheers, Sven ✌️
@ArchInternship
@ArchInternship 8 ай бұрын
Hey bro, How can I get word clouds in text format
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks for watching. Off the top of my head, I'm not sure how to do that. You might need to do a little Google research. Good luck! Cheers, Sven ✌️
@thedanikarasnagoda4161
@thedanikarasnagoda4161 Жыл бұрын
I'm having an error when installing wordcloud. It says, "this is an issue with the package mentioned above, not pip".
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Hard to tell from a distance why you are facing an error. Sorry, that I cannot help.
@thedanikarasnagoda4161
@thedanikarasnagoda4161 Жыл бұрын
@@CodingIsFun thanks anyways
@rashmisingh6712
@rashmisingh6712 Жыл бұрын
All videos are very helpful..🙏 Thanks for your effort sir.. But how can i make wordcloud in different shapes??
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Please check out the docs. Here is one example: amueller.github.io/word_cloud/auto_examples/frequency.html#sphx-glr-auto-examples-frequency-py
@rashmisingh6712
@rashmisingh6712 Жыл бұрын
@@CodingIsFun Done... 👍 Thnks for ur reply
@fikrimuhammadf8673
@fikrimuhammadf8673 4 жыл бұрын
i can't install wordcloud in my python, why??
@CodingIsFun
@CodingIsFun 4 жыл бұрын
Do you receive any error message?
@jamesstew6578
@jamesstew6578 2 жыл бұрын
awsome tutorial! but how do can you display 2 words together like " Red apple" or "Happy Smile"
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you for watching the video and for your question. Unfortunately, I do not know how to implement that right off the bat. I would also need to search the internet for a solution. Sorry that I cannot help!
@jamesstew6578
@jamesstew6578 2 жыл бұрын
@@CodingIsFun thanks alot for the answer. I will try to solve it, it is an good lesson to fix stuff by my own but it is hard tho xD
@ahmadnadeem870
@ahmadnadeem870 Жыл бұрын
How to add hyperlink on words of cloud?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching the video and for your question! I'm sorry to say that I don't have the answer right off the top of my head. I'll need to do a little digging online to see if I can find a solution. Sorry I couldn't be more help!
@ahmadnadeem870
@ahmadnadeem870 Жыл бұрын
Only heart!!! No hint😭
@Larzsolice
@Larzsolice 2 жыл бұрын
I have many documents and a list of words that are statistically significant across all the documents combined. I want to make a word cloud for each document class, feeding in a list of words and the average expression of those words within each set of documents. What function should I use?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you for watching the video. Your questions are great, but finding the time to answer them is difficult. Kindly understand that I receive many requests for individual solutions or modifications. That said, you might want to join our Discord server ( pythonandvba.com/discord ) and post your question there. Thanks for your understanding. Happy Coding!
@edgardoas5053
@edgardoas5053 3 жыл бұрын
Hi brother, how could I avoid spanish useless words. regards from Chile!
@CodingIsFun
@CodingIsFun 3 жыл бұрын
*Hello Edgardo AS, thanks for watching the video and your question.* You could provide a list of words [stopwords], which you would like to exclude. Kindly see the example below: stopwords = ['hola', 'soy', 'Sven'] wc = WordCloud( background_color='white', stopwords=stopwords, height = 600, width=400 ) Hope it helps 🙏 Cheers, Sven
@edgardoas5053
@edgardoas5053 3 жыл бұрын
Thanks a lot, it worked.
@aarihant2001
@aarihant2001 3 жыл бұрын
easy
@CodingIsFun
@CodingIsFun 3 жыл бұрын
Nice :)
WordCloud with Python - Full tutorial with examples
19:49
Python enthusiast
Рет қаралды 19 М.
Word Cloud in python | Word cloud tutorial
14:39
The AI & DS Channel
Рет қаралды 6 М.
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 53 МЛН
Create A Word Cloud In Microsoft Word
4:58
The Tech Train
Рет қаралды 811 М.
Create Fancy Word Clouds in Python
12:55
NeuralNine
Рет қаралды 17 М.
Request API data using Python in 8 minutes! ↩️
8:34
Bro Code
Рет қаралды 32 М.
Sentiment Analysis with Transformers in Python
7:34
NeuralNine
Рет қаралды 6 М.
How to make a WORD CLOUD in Word | Create an easy WORD CLOUD
14:10
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 98 М.
How to Create a Beautiful Python Visualization Dashboard With Panel/Hvplot
10:57
Thu Vu data analytics
Рет қаралды 555 М.
How to Create a Wordcloud with Python
5:53
Analytics with Adam
Рет қаралды 3,9 М.
Generating Word Cloud in Python | GeeksforGeeks
8:01
GeeksforGeeks
Рет қаралды 14 М.