WordCloud with Python - Full tutorial with examples

Sdílet
Vložit
  • čas přidán 5. 08. 2024

Komentáře • 56

  • @sn4k321
    @sn4k321 Před 2 lety

    Thanks bro! You exlained with a very simple way!

  • @alhdlakhfdqw
    @alhdlakhfdqw Před 3 lety

    thank you very much for all your great vids Kostadin! :)

  • @somebodyelseyoudontknow

    Thank you so much for the easy to follow tutorial

  • @mariamitroussi3180
    @mariamitroussi3180 Před 3 lety

    Thank you for everything. Really interesting and well-explained video.!

  • @g2gdude519
    @g2gdude519 Před 3 lety +1

    Thanks for the excellent python tutorial. Subscribed!

  • @engitect
    @engitect Před 4 lety +2

    Well explained. Subscribed!

    • @Pythonenthusiast
      @Pythonenthusiast  Před 4 lety +1

      Thank you for the comment and for subscribing to the channel!

  • @mansi_ax
    @mansi_ax Před 3 lety +1

    Thank you for explaining so many variations of wordclouds with examples in a single video!

  • @nicoloretis6328
    @nicoloretis6328 Před 3 lety

    Excellent tutorial, seriously

  • @Bone51211
    @Bone51211 Před 2 lety

    Very helpful

  • @nehasingh7975
    @nehasingh7975 Před 3 lety

    Thanks!

  • @debatradas9268
    @debatradas9268 Před 2 lety

    thank you so much

  • @suraiyashahreen1305
    @suraiyashahreen1305 Před 4 lety

    you deserve many likes istg

  • @jimmyibanez2178
    @jimmyibanez2178 Před 3 lety

    thanks, the best video

  • @jakeg9711
    @jakeg9711 Před 2 lety

    Is there a way to show both word cloud and bar chart? Thanks

  • @maxparsons9431
    @maxparsons9431 Před rokem

    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?

  • @naimuddinsiddiqui9249
    @naimuddinsiddiqui9249 Před 3 lety +1

    can you please explain syntex for python 3.9.5 ?

  • @nishaFly9
    @nishaFly9 Před 4 lety

    great, i tried to code.. it worked. Thanks Kostadin Ristovski

  • @tiffanyw3794
    @tiffanyw3794 Před 2 měsíci

    Can we change the font used

  • @RupamMedhi
    @RupamMedhi Před 3 lety +1

    How to make the output image transparent like PNG file?

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety

      Hi Rupam, I think the link below will help you out:
      github.com/amueller/word_cloud/issues/186
      I guess the only solution is to set the background color to a transparent background. Give it a try and let me know if it worked!

  • @naimuddinsiddiqui9249
    @naimuddinsiddiqui9249 Před 3 lety

    thanks a billons

  • @GeekyMino
    @GeekyMino Před 4 lety +2

    Great tutorial. Is there a way to make the words appear one after another with some delay? It would be really cool to make an animation like that :)

    • @Pythonenthusiast
      @Pythonenthusiast  Před 4 lety +1

      That is a great question. This library doesn't have that option built-in. It only counts the frequency of the words and then takes a few settings (such as the font size and the number of words) in order to create the plot on a predefined surface.
      The only library known to me at the moment that has some animations is WordSwarm. It plots the words over time creating an animation. The words increase/decrease in size as the time in the animation goes by. Maybe that's worth checking :)

  • @chetanyasaini3899
    @chetanyasaini3899 Před rokem

    how to install pil lib?

  • @MegaLobo000
    @MegaLobo000 Před 4 lety

    Excelente video. disculpa estoy necesitando hacer una lista de nubes de palabras donde tengo como información básica las filas de una tabla. Sabes donde puedo conseguir información. Muchas gracias

    • @Pythonenthusiast
      @Pythonenthusiast  Před 4 lety

      Hi Jesus, thanks for the question (and also for Google translate that helped me translate it). I guess the table has the word and the number of time it repeats. What you can do is, create an empty list, and then loop through your table. It would look something like this:
      empty_list = []
      For i in range(number_of_rows_in_the_table):
      for x in range(times_the_word_is_repeating):
      empty_list.append(the_word)
      If you do this part correctly, your "empty_list" would no longer be empty and would contain all the words.
      Good luck and hope this helps!

  • @MeMeHUB-lq2ky
    @MeMeHUB-lq2ky Před 3 lety

    Can I change font?

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety

      Hi there! Yes, you can also change font. Check the documentation part:
      amueller.github.io/word_cloud/generated/wordcloud.WordCloud.html?highlight=font
      You need to add the font_path accordingly.

  • @hakunamatata-qu7ft
    @hakunamatata-qu7ft Před 3 lety

    Hello bro,how to take text and image from user and generate the image

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety

      Hi Manoj, that is a very good question.
      One of the easiest ways to do that is combining the code in this tutorial and use Tkinter.
      You can create a GUI (graphical user interface) and allow the user to click a button in order to load an image as well as input the text (either from a file or type it in a box).
      Hope this helps!

    • @hakunamatata-qu7ft
      @hakunamatata-qu7ft Před 3 lety

      But I am new to this python and programming I felt your videos so helpful so I m taking baby steps,anyways you are of great help ,if I have a question may I reach you if you don't mind

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety +1

      There's no such thing as easy beginning. Keep going and don't give up. Whenever you're stuck, don't forget that most likely Google and Stack Overflow have your answer :) I'm always happy to help.

  • @ucol2068
    @ucol2068 Před 3 lety

    Hello bro, I get an error when trying to install word cloud. I use a Mac

  • @priyanshkulshrestha799

    its not working on my mask images.

    • @Pythonenthusiast
      @Pythonenthusiast  Před 4 lety

      Well, in the tutorial I've mentioned the possible reason when it won't work. It could be that your mask is not good enough for this purpose.

  • @MrKelvinks
    @MrKelvinks Před 3 lety

    what if I want the words to appear as phrases? for example - I love to hug, Happy Birthday, really cool guy. How can you accomplish that?

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety

      Hello there!
      The purpose of this library is to fill a given shape using the most-frequently used words.
      I don't fully understand the question as there are 2 scenarios:
      1. You want phrases to appear, not only words. In that case, you need to have the phrase as an element that will be used to fill the shape.
      2. You want the shape of the wordcloud to be a phrase. In that case, you need an image of the phrase that you'll use as a shape that is to be filled.
      Hope this helps!

    • @MrKelvinks
      @MrKelvinks Před 3 lety

      @@Pythonenthusiast what i meant is rather than pick up single words, can it pick up more than one word as a block...so instead of just picking up "good", it picks up " he is good", so in the word cloud what you see is he is good, rather than just good...if that makes sense..

    • @Pythonenthusiast
      @Pythonenthusiast  Před 3 lety +2

      ​@@MrKelvinks Think from the library's point of view. What it does is it takes words and builds a cloud. The more times a word shows, the larger it is in size. Now, let's say that you have phrases, stored in a list, such as:
      ['He is kind', 'He is kind', 'He is good', 'He is smart', 'He has 5 dogs', 'He is kind'] etc.
      This should work as you have phrases and frequency. Note that you need lots of phrases in order to build a wordcloud in a particular shape and you need the phrases to repeat different amount of times for the size.
      However, if you have a piece of text and let's say that the following sentence is part of it:
      "He is kind, smart and has 5 dogs.".
      The library would not separate "He is kind" only. The only way you can use text is to separate by dot, meaning separate each sentence separately.
      However, then you'll have all sentences as part of the cloud, unless you manually select the phrases, which goes back to the first example in this comment.
      Note that there is a reason why this library is called "WordCloud" :)
      Hope this helps!

  • @salikmalik7631
    @salikmalik7631 Před 4 lety +1

    can you make make a videos on numpy...

    • @Pythonenthusiast
      @Pythonenthusiast  Před 4 lety

      Hey Salik, Thanks for the comment. Absolutely, it is on my list :)

    • @salikmalik7631
      @salikmalik7631 Před 4 lety

      @@Pythonenthusiast Thanks for reply. The way demonstrate is awesome.
      That's why I asked for numpy. I want it.

  • @fiqoanugrah9884
    @fiqoanugrah9884 Před 2 lety

    mana anak pacil

  • @farhanrasool8477
    @farhanrasool8477 Před 2 lety

    Thanks!