A little word cloud generator
Project description
Linux | macOS | Windows | |
---|---|---|---|
PyPI |
word_cloud
A little word cloud generator in Python. Read more about it on the blog post or the website.
The code is tested against Python 2.7, 3.4, 3.5, 3.6 and 3.7.
Installation
If you are using pip:
pip install wordcloud
If you are using conda, you can install from the conda-forge
channel:
conda install -c conda-forge wordcloud
Installation notes
wordcloud depends on numpy
and pillow
.
To save the wordcloud into a file, matplotlib
can also be installed. See examples below.
If there are no wheels available for your version of python, installing the package requires having a C compiler set up. Before installing a compiler, report an issue describing the version of python and operating system being used.
Examples
Check out examples/simple.py for a short intro. A sample output is:
Or run examples/masked.py to see more options. A sample output is:
Getting fancy with some colors:
Generating wordclouds for Arabic:
Command-line usage
The wordcloud_cli
tool can be used to generate word clouds directly from the command-line:
$ wordcloud_cli --text mytext.txt --imagefile wordcloud.png
If you're dealing with PDF files, then pdftotext
, included by default with many Linux distribution, comes in handy:
$ pdftotext mydocument.pdf - | wordcloud_cli --imagefile wordcloud.png
In the previous example, the -
argument orders pdftotext
to write the resulting text to stdout, which is then piped to the stdin of wordcloud_cli.py
.
Use wordcloud_cli --help
so see all available options.
Licensing
The wordcloud library is MIT licenced, but contains DroidSansMono.ttf, a true type font by Google, that is apache licensed.
The font is by no means integral, and any other font can be used by setting the font_path
variable when creating a WordCloud
object.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for wordcloud-1.8.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e9cff2c6939b5e1fa87d2a2c5d79c8ac2eafc4c9b9bc1bcb865ca5fde7e758 |
|
MD5 | 0a3efb1e5adf2b2ca769942b11806b83 |
|
BLAKE2b-256 | 08838b69c31668f62a8b4714294d4feaff906fac93c175a74fa5025fe483547c |
Hashes for wordcloud-1.8.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f190eb3efcc17765a4ed9d78001fdb713988886b93e54b2758fcf4f6c519ad51 |
|
MD5 | e8bd68723d59bdd6ca854f7930f777a6 |
|
BLAKE2b-256 | fc7e5848c211b1f141ffae41f0f05d72c0bfdb4816f9bf9d80f02962d019b8fe |
Hashes for wordcloud-1.8.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4a626df47eacec207988e1ffdb5bd16b2b62ac83ea2442a0043080c0c5103ac |
|
MD5 | 860c29c06073e3196f30a4f515d229bc |
|
BLAKE2b-256 | 93051f17541135c5bb75c1415d4bda1ab80a80b5b1e7ab673d73f74f230d15db |
Hashes for wordcloud-1.8.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daa7d72f0004fcfea5f649f1683dbe47c4a9c5f721aabeb41278a4ee33f21424 |
|
MD5 | 0cd976be140f5e4709e733e9a201f5ab |
|
BLAKE2b-256 | 505bf588bbd1a7805a742e8d8316740383822b160c4e36b6c14793b57ebe7360 |
Hashes for wordcloud-1.8.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e1fc5991f52a0e191873025f5d8cf852eb1c39f2579d43e6d2589dc04d620d9 |
|
MD5 | 2af9e5ea85ec000cc5e1088471891490 |
|
BLAKE2b-256 | a7f0f7384c323c1fc7149573455f9633ef063c7b4d85c64d419b711bbca9ed29 |
Hashes for wordcloud-1.8.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ed09d2d2916514845e42b0cc5dd86f65d4f0f89ab4bf164cc9a628d9db5a76b |
|
MD5 | b3d9e1b46eaa1026e09adff5012c578b |
|
BLAKE2b-256 | a5307fa93aa322d0ea910e5f87752921b4006d01dd664049f6fc1032447d6c77 |
Hashes for wordcloud-1.8.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff0ca777c801cd2a38deef30019f02fe35df1be9c31f6c301a34bd45006e26b |
|
MD5 | fcec516016a7cf52b3d8ffca527aae5b |
|
BLAKE2b-256 | 1b060516bdba2ebdc0d5bd476aa66f94666dd0ad6b9abda723fdf28e451db919 |
Hashes for wordcloud-1.8.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d5f63cf1f65126d6d1b8d55acae15961c5bd55e6ef8978bf269831dafcd1408 |
|
MD5 | 080e30167501470ed88e9465370790bb |
|
BLAKE2b-256 | a4fd0be730526bae8355cadbea1c9e1cfbbfe5a92347f6937ea4474c467c04d1 |
Hashes for wordcloud-1.8.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd8c44a21a3207da813c7b7e486ed41fe517eb7b8535deef945437f4cea2b245 |
|
MD5 | b47cfd48f378b86f062047d7ee369263 |
|
BLAKE2b-256 | 925277c1ee2759fc5ff509c199aff3bd3228d01ecc46bfc21a7ce3bbea5a98c9 |
Hashes for wordcloud-1.8.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41dafafe3768675ba8285d21ac68bd53191b50da85aba2a7fb35964d1649156f |
|
MD5 | e811836661dd67a0740bcabfdcccd05a |
|
BLAKE2b-256 | 05e752e4bef8e2e3499f6e96cc8ff7e0902a40b95014143b062acde4ff8b9fc8 |
Hashes for wordcloud-1.8.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49f5213e978fb5d8ff8f6e6067de657e81ca863cab549b198579f58e1430e7c |
|
MD5 | 2d470da6f5e8a332c0ef30ffe44c57a5 |
|
BLAKE2b-256 | 56ff2b242a0e40036a310f2cf4310cff5e8d3df92656f1ab1f450fbb76b74237 |
Hashes for wordcloud-1.8.1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6450f67c207f2ab4513c4aac803226427b39f7fc8d3498c0b41a03834b2fc426 |
|
MD5 | 5378f7cc5aabb6e058388febe6d2e4b9 |
|
BLAKE2b-256 | 86c9581b28693812d8f3f38bc8e755eb40f25fd84885186bdcdd1d90aec4855e |
Hashes for wordcloud-1.8.1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a02b27400bc4b2e4efdd8377e8cd138496b6b6e15a082d9c7b7c7b74a9ee8a55 |
|
MD5 | 6fc9c50d2f0fe5e0367c7e23286a0a71 |
|
BLAKE2b-256 | 739c650edda8f534cf73eda026ef3f7e83dabc469ee58efa86cae944accbcc42 |
Hashes for wordcloud-1.8.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0d3f03e4f27faf543859b4bcd229d320361d065cf4786f149081adea4ee68e8 |
|
MD5 | 8b072e41ada4fe5bfa0fdb36e12839fe |
|
BLAKE2b-256 | d8f293f40e5e64a1a6b654b5c637116ac4bee1e8b78a3e98fe6f5adf46a4fc32 |
Hashes for wordcloud-1.8.1-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e85b1a6b8211436d47f902837c866c682c5d00046706f1d8e72cc0cd9210d64 |
|
MD5 | 0fd2f293525da51217ef4d6b4ff8e07b |
|
BLAKE2b-256 | 8cfee8fcf3369cd2a4c118915d9f3ecca377aaf96691c9393996d94fd516546f |