Command Line Interface
A simple command line interface for wordcloud module.
usage: wordcloud_cli [-h] [--text file] [--regexp regexp] [--stopwords file] [--imagefile file] [--fontfile path] [--mask file] [--colormask file] [--contour_width width]
[--contour_color color] [--relative_scaling rs] [--margin width] [--width width] [--height height] [--color color] [--background color]
[--no_collocations] [--include_numbers] [--min_word_length min_word_length] [--prefer_horizontal ratio] [--scale scale] [--colormap map] [--mode mode]
[--max_words N] [--min_font_size size] [--max_font_size size] [--font_step step] [--random_state seed] [--no_normalize_plurals] [--repeat] [--version]
Named Arguments
- --text
specify file of words to build the word cloud (default: stdin)
Default:
-- --regexp
override the regular expression defining what constitutes a word
- --stopwords
specify file of stopwords (containing one word per line) to remove from the given text after parsing
- --imagefile
file the completed PNG image should be written to (default: stdout)
Default:
-- --fontfile
path to font file you wish to use (default: DroidSansMono)
- --mask
mask to use for the image form
- --colormask
color mask to use for image coloring
- --contour_width
if greater than 0, draw mask contour (default: 0)
Default:
0- --contour_color
use given color as mask contour color - accepts any value from PIL.ImageColor.getcolor
Default:
'black'- --relative_scaling
scaling of words by frequency (0 - 1)
Default:
0- --margin
spacing to leave around words
Default:
2- --width
define output image width
Default:
400- --height
define output image height
Default:
200- --color
use given color as coloring for the image - accepts any value from PIL.ImageColor.getcolor
- --background
use given color as background color for the image - accepts any value from PIL.ImageColor.getcolor
Default:
'black'- --no_collocations
do not add collocations (bigrams) to word cloud (default: add unigrams and bigrams)
Default:
True- --include_numbers
include numbers in wordcloud?
Default:
False- --min_word_length
only include words with more than X letters
Default:
0- --prefer_horizontal
ratio of times to try horizontal fitting as opposed to vertical
Default:
0.9- --scale
scaling between computation and drawing
Default:
1- --colormap
matplotlib colormap name
Default:
'viridis'- --mode
use RGB or RGBA for transparent background
Default:
'RGB'- --max_words
maximum number of words
Default:
200- --min_font_size
smallest font size to use
Default:
4- --max_font_size
maximum font size for the largest word
- --font_step
step size for the font
Default:
1- --random_state
random seed
- --no_normalize_plurals
whether to remove trailing ‘s’ from words
Default:
True- --repeat
whether to repeat words and phrases
Default:
False- --version
show program’s version number and exit