All Questions
Tagged with word-cloud python-3.x
48 questions
1
vote
0
answers
97
views
How to loop through records and create multiple WordCloud charts?
I have a simple dataframe with two columns of text. Here is my script.
from wordcloud import WordCloud, STOPWORDS
for i in df_cat.columns:
text = df_cat[i].values
wordcloud = WordCloud()....
1
vote
1
answer
3k
views
Package install issue "error: legacy-install-failure" MacOS
I am getting the below error when trying to install wordcloud. I am using MacOs 13.0.1 and Python 3.8.10.
Jesse-Burton@MacBook-Pro-4 ~ % pip3 install wordcloud
Collecting wordcloud
Using cached ...
2
votes
1
answer
4k
views
Cant get pip to install wordcloud on mac 10.13 python 3.11
output from pip install wordcloud
Collecting wordcloud
Using cached wordcloud-1.8.2.2.tar.gz (220 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.6.1 (from ...
2
votes
2
answers
525
views
Why are important, high-ranking (highly frequent) words that are not stop words missing in my word cloud?
I uploaded a list of highly frequent words which includes stop words and I used the STOPWORDS list to remove stop words. When I print my word cloud, it's not displaying several non-stopwords that are ...
0
votes
1
answer
130
views
Difference between defining a variable as a=[a] and a= ' ' in python
I have below two doubts
1)I am trying to build a wordcloud and for doing that am defining a variable a=[ ] but it throws error but if I define it as a='' it works well. Please tell me what is the ...
1
vote
0
answers
282
views
Extracting most common word using WordCloud but it extracts the most common letters
I'm trying to extract the most common words using a Wordcloud, but instead i'm getting the most common letters. Here's my code:
from wordcloud import WordCloud
stop = set(stopwords.words('english'))
...
1
vote
2
answers
6k
views
Best way to generate a high quality word-cloud image for a Dash-app
I have an issue with my wordclouds displaying very pixelated on my plotly dash app. I am using the wordcloud class to generate the wordcloud, then using go.Figure() with a go.Image() trace to generate ...
0
votes
1
answer
665
views
Install packages such as Wordcloud for Python: what tools to be installed?
when trying to install packages such as wordcloud, I get the error message
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio....
-1
votes
1
answer
797
views
generating wordcloud with python
I am trying to create a wordcloud from a text file and I need to plot only alphas,
below is the code
with open("worldcloud.txt") as f:
count = dict()
for line in f:
words = line.split()
...
0
votes
2
answers
247
views
How to count word count in Data Frame using word list?
I have a question about word count using python.
Data Frame have three columns.(id, text, word)
First, This is example table.
[Data Frame]
df = pd.DataFrame({
"id":[
"100&...
1
vote
2
answers
2k
views
How to resolve ImportError: cannot import name 'makeMappingArray' from 'matplotlib.colors'
I am just learning to code using the wordcloud and stylecloud libraries in python 3.9.0. I wrote the basic code for the stylecloud library but it gives an error that says:
ImportError: cannot import ...
0
votes
1
answer
123
views
I have made a wordcloud using python and I want to look at the words in the wordcloud and if necessary, remove them from the image
So basically, I have a file where I have a few lists which I want to use to see if the words are present in a dictionary I have been given, and if yes, form a wordcloud out of it. Now after looking at ...
1
vote
1
answer
744
views
How to create wordcloud chart for each userid based on frequency and value in python [duplicate]
Im trying to create each word cloud graph for each user based on the word and count frequency and I want to store output of word cloud image path in dataframe along with UID.Do I need apply group by? ...
0
votes
1
answer
415
views
plot Word cloud without stopwords
Iam looking to plot Wordcloud using a column in my pandas dataframe
here is my code:
all_words=''.join( [tweet for tweet in tweet_table['tokens'] ] )
word_Cloud=WordCloud(width=500, height=300, ...
0
votes
1
answer
782
views
Color-highlight a single key in a python wordcloud.WordCloud data-viz when also using a color_func
I'm looking for a way to change a single element of a color mapping in python (to highlight one specific key).
To debug, I tried to run a hard-coded update for the hsl at list position 0 to [50,50,50] ...
2
votes
2
answers
8k
views
NameError: name 'file_content' is not defined
I did an assignment on Coursera and successfully passed that.I compiled and got accurate result on Jupyter notebook.
https://poskzjbvcahynihgdhljpw.coursera-apps.org/notebooks/C1M6L2_Final_Project_V3....
0
votes
1
answer
593
views
Empty WordCloud PNG outputted from Arabic Text
`
import arabic_reshaper
from pyarabic.araby import tokenize
from pyarabic.unshape import unshaping_text
from pyarabic import araby
import matplotlib.pyplot as pPlot
from wordcloud import WordCloud, ...
1
vote
1
answer
752
views
No output on the screen word-cloud with matplotlib
from wordcloud import WordCloud
import matplotlib.pyplot as plt
text = '''python python python python python
big data big dat big data big data big data big data big data big data big data big data
...
2
votes
2
answers
802
views
I can't generate a word cloud with some images
I just start the module worcloud in Python 3.7, and I'm using the next cxode to generate wordclouds from a dictionary and I'm trying to use differents masks, but this works for some images: in two ...
2
votes
1
answer
4k
views
How to create wordcloud from LDA model?
Following the documentation of ?gensim.models.ldamodel, I want to train an ldamodel and (from this SO answer create a worcloud from it). I am using the following code from both sources:
from gensim....
0
votes
1
answer
438
views
Making a Wordcloud from a Whatsapp text file with Chinese Characters
I'm very new to programming and I'm trying to generate a word cloud from a WhatsApp text file that has Chinese characters in it.
I've been trying to combine two tutorials I found on the web and it is ...
3
votes
1
answer
3k
views
Keeping words together in WordCloud
I'm working with word clouds in python, using the wordcloud library.
As an example, I want to do a wordcloud from the following list:
word_ls = ['orchards growers northern', 'apple orchards growers',...
0
votes
1
answer
550
views
How to make run a code with a wordcloud error
I am trying to do a wordcloud from a a dataframe in Python, however when I tried to run the code it gives me an error message as the following one: NameError: name 'text' is not defined.
The ...
1
vote
1
answer
2k
views
cpu-percent in psutil returns 0.0 for every process
I've been inspired to try to make a wordcloud wallpaper generator by a similar github project. I'm not much experienced and this seems like a good beginner-ish project.
For now I'm trying to get some ...
2
votes
2
answers
2k
views
How to create word cloud of different group in Python?
I have below data, and I am trying to create wordcloud for each and every "person" i.e. 1,2,3. I am using below code for wordcloud creation,but I am not sure how to create word cloud for each group.
...
0
votes
0
answers
82
views
Extract only content with Scrapy to create WordClouds
I am looking for a smart solution to extract only the main information of a range of different webpages. When building wordclouds, I always get the problem of having to define a range of different ...
1
vote
1
answer
2k
views
Plotting WordCloud for each Cluster in K Means Clustering
I have a set of BOW features and also I know the best n_clusters to be used.I need help in plotting a WordCloud per each cluster so that we can analyze the words in each cluster in one go.
Please ...
0
votes
1
answer
1k
views
How to handle big textual data to create WordCloud?
I have a huge textual data that I need to create its word cloud. I am using a Python library named word_cloud in order to create the word cloud which is quite configurable. The problem is that my ...
0
votes
1
answer
514
views
Python wordcloud can't present Hebrew
I am trying to create wordcloud to a text in Hebrew.
The text is:
את הסיפור שלנו סיפרנו לעצמנו כל הזמן. בכפייתיות. בעל פה. לפעמים
התעייפנו עוד לפני שהתחלנו ובכל זאת סיפרנו במשך שעות. הקשבנו רוב ...
0
votes
1
answer
717
views
How to call stopwords from a txt file using wordcloud STOPWORDS
I am extracting a wordcloud from a pdf file. I can extract stopwords from a list but cannot extract using a txt file. I know there is a problem with calling the path to the file.
I have success ...
0
votes
2
answers
2k
views
WordCloud 'module' object is not callable Python3
Ok, so I'm trying to extract text from a pdf and display a wordcloud from the extractedText.
Recieving TypeError: 'module' object is not callable
at line
cloud = wordcloud(mask=rsMask).generate(...
0
votes
0
answers
1k
views
WordCloud.process_text vs sklearn's CountVectorizer
I would like to count the term frequency across the corpus. To do that, there are two ways, which was using CountVectorizer and sum in axis=0 as below.
count_vec = CountVectorizer(tokenizer=...
3
votes
1
answer
297
views
How to remove unigrams from word dictionary in Python
I am trying to create a wordcloud with only bigrams in python. Now I have a dictionary as follows:
Word_dict
{'delivered later requested_delivered later requested': 0.07590105638848002,
'delayed ...
-1
votes
1
answer
1k
views
Word Cloud Using Python
I want to create a word cloud with the variable 'word' that will show me the cloud of all words that are 'NN' and 'NNP'
import matplotlib.pyplot as plt
from wordcloud import WordCloud, STOPWORDS, ...
0
votes
2
answers
2k
views
How to Randomize the button location in python using tkinter?
I am trying to create a clickable word cloud for which I am starting to apply logic with button. I am able to split the words of text file using regular expressions and create button for each word. ...
2
votes
0
answers
524
views
wordcloud cannot convert float NaN to integer
Im trying to create a wordcloud after vectorizing text from a pdf and i get the following error:
cannot convert float NaN to integer
here is a slice of the code
from wordcloud import WordCloud as wc
...
1
vote
1
answer
452
views
"DLL load failed: The specified module could not be found" error on using wordcloud in Jupyter notebook
I installed the word cloud library in python to use wordcloud. I am able to successfully use it in all editors like sublime, etc but when I am trying to use it in Jupyter notebook then it is giving me ...
0
votes
1
answer
553
views
Separate Spam and Ham for WordCloud Visualization
I am performing spam detection and want to visualize spam and ham keywords separately in Wordcloud. Here's my .csv file.
data = pd.read_csv("spam.csv",encoding='latin-1')
data = data.rename(columns = ...
0
votes
1
answer
160
views
Ubuntu 16.04 Python Version Management Issue
I have Python3.5 and Python3.6 installed on Ubuntu 16.04. I have installed pip for 3.6 and am using 3.6 for development. I tried to install a package (wordcloud) in 3.6 and it appeared to install ...
0
votes
4
answers
6k
views
Reflect Arabic Word-Cloud
This code run the huge data but with all Arabic words written in reverse:
from bidi.algorithm import get_display
import os
import matplotlib.pyplot as plt
from wordcloud import WordCloud
os.chdir("C:...
1
vote
4
answers
3k
views
Word Cloud Arabic
I had some problem with WordCloud code in python when try to run Arabic huge data
this my code:
from os import path
import codecs
from wordcloud import WordCloud
import arabic_reshaper
from bidi....
3
votes
1
answer
9k
views
TypeError: expected string or bytes-like object ( Python 3) ( Wordcloud)
import pandas as pd
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
import wordcloud
from wordcloud import WordCloud,STOPWORDS
# Read the whole text.
remarks = open(r'C:\...
5
votes
1
answer
11k
views
How do I remove words from my wordcloud? (Python 3)
import pandas as pd
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
import wordcloud
from wordcloud import WordCloud,STOPWORDS
# Read the whole text.
remarks = open(r'C:\...
12
votes
2
answers
45k
views
Wordcloud Python with generate_from_frequencies
I'm trying to create a wordcloud from csv file. The csv file, as an example, has the following structure:
a,1
b,2
c,4
j,20
It has more rows, more or less 1800. The first column has string values (...
5
votes
1
answer
2k
views
wordcloud for non-english corpus
wordcloud for non English text
Dear friends
I am facing problems in generating proper wordcloud for non english text. The cloud is generated but it gives un-satisfactroy results. It shows wordcloud ...
0
votes
0
answers
2k
views
To generate wordcloud in python jupyter notebook environment
I am working corpus analysis for non english text, but I am facing several problem like clustering with k-means
Now I am facing problem in generating wordcloud in python 3.5.2 jupyter notebook
I ...
1
vote
1
answer
1k
views
Python word cloud - IndexError: string index out of range
I am trying to build wordcloud using dictionary of words in python.
here is my script
from wordcloud import WordCloud
words = {'Python':15, 'Pandas':13, 'R':16, 'Analyis':10, 'Scikit learn':19, '...
2
votes
4
answers
29k
views
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\mswitajski\\Desktop\\alice.txt'
I'm trying to read in a text file to work with Word Clouds. Here is the syntax I'm trying:
# Read the whole text.
text = open(r'C:\Users\mswitajski\Desktop\alice.txt').read()
But I keep getting the ...