A predictable, interpretable wordcloud library
Project description
wrdcld
A predictable, interpretable wordcloud library
wrdcld is available to install via pip
pip install wrdcld
Basic Usage
To make a basic wordcloud, you simply pass a list of words to the make_word_cloud function. Here is a basic example generating a word cloud of the Sherlock Holmes story The adventure of the dancing men.
from pathlib import Path
from wrdcld import make_word_cloud
contents = Path("examples/dancingmen.txt").read_text(encoding="utf-8")
all_words = [word.strip(" \n,.!?:-&\"'[]") for word in contents.split(" ")]
all_words = [word for word in all_words if word]
make_word_cloud(
all_words=all_words,
font_color=(0, 0, 0), # RGB
background_color=(255, 255, 255),
minimum_font_size=5,
).show()
Development
Setup
Run poetry install
Development
Run poetry run isort wrdcld tests, poetry run black wrdcld tests and poetry run pylint wrdcld tests for styling and linting.
Testing
Run python -m unittest discover tests/
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wrdcld-0.2.0.tar.gz.
File metadata
- Download URL: wrdcld-0.2.0.tar.gz
- Upload date:
- Size: 98.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-23-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34251b41333e6ad4eea385bbd92ca8f2b640155a099ee78d4d741f8e5cb81ee0
|
|
| MD5 |
10ceb5c83906acc5e5335d1e6dd2767e
|
|
| BLAKE2b-256 |
f7eb401c7e4753cce152aa22be0d48e2a02d1edacc2796ff3ac1ca7573119b9c
|
File details
Details for the file wrdcld-0.2.0-py3-none-any.whl.
File metadata
- Download URL: wrdcld-0.2.0-py3-none-any.whl
- Upload date:
- Size: 98.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-23-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
486b33d5c3ece0e3c37417e498deaee67fe3eff739acbfaa406a0c53baf88a70
|
|
| MD5 |
aac36e7cd433a20aa62dab84d685e4a4
|
|
| BLAKE2b-256 |
fc6b6ce2214b175ff7227b54ee622b156b8c4be3e9d5869b7d0976f870992317
|