Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivam5992/pywordcloud
:postbox: python package to generate word clouds of text data, online-demo hosted in pywordcloud-flask library
https://github.com/shivam5992/pywordcloud
python text wordcloud
Last synced: 1 day ago
JSON representation
:postbox: python package to generate word clouds of text data, online-demo hosted in pywordcloud-flask library
- Host: GitHub
- URL: https://github.com/shivam5992/pywordcloud
- Owner: shivam5992
- Created: 2014-06-12T17:09:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-03T09:45:33.000Z (over 10 years ago)
- Last Synced: 2024-08-10T11:28:24.801Z (5 months ago)
- Topics: python, text, wordcloud
- Language: Python
- Homepage: http://pypi.python.org/pypi/pywordcloud/
- Size: 195 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
pywordcloud
===========Python package to generate word clouds by analysing the text.
Features
--------* Generate output format in HTML
* Control over css styling
* Control over Words
Install
-------You can install pywordcloud either via the Python Package Index (PyPI) or from source.
To install using pip:
$ pip install pywordcloud
To install using easy_install:
$ easy_install pywordcloudDownloading and installing from source
Download the latest version of PyTagCloud from http://pypi.python.org/pypi/pywordcloud/
You can install it by doing the following,:
$ tar xfz pywordcloud-*.tar.gz
$ cd pywordcloud-*/
$ python setup.py build
$ python setup.py install # as rootUsage
-----
from pywordcloud import pywordcloudif __name__ == '__main__':
text = open("input.txt").read()
create(text,
outfile="output.html",
uppercase=False,
showfreq=True,
frequency=100,
removepunct = False,
minfont = 1.5,
maxfont = 6,
hovercolor="green",
showborder=False,
fontfamily='calibri',
width="1000px",
height="400px",
#colorlist = ["red","blue","yellow","black","green"]
)Arguments
---------**text:** Input text to create word cloud
**outfile:** Name of the ouput file, should ends with .html
**uppercase:** Boolean True to generate WC with all words in Upper Case, Otherwise False
**showfreq:** Boolean True to generate WC with words and their frequencies
**frequency:** Number of words to display in WC
**removepunct:** Set True to remove all punctuations from text
**minfont:** Set minimum font in Word Cloud (in pixels)
**maxfont:** Set maximum font in Word Cloud (in pixels)
**hovercolor:** Set hover color for words
**showborder:** Bollean True to show border of WC
**fontfamily:** Set Font Family for WC
**width:** Set Width of WC
**height:** Set height of WC
**colorlist:** Set custom color list seperated by commas.
Examples
--------![image](http://i58.tinypic.com/2q1gnrr.png)