본문 바로가기

Python

pytagcloud 0.3.5

pytagcloud: Create beautiful tag clouds as images or HTML

from pytagcloud import create_tag_image, make_tags
from pytagcloud.lang.counter import get_tag_counts

YOUR_TEXT = "A tag cloud is a visual representation for text data, typically\
used to depict keyword metadata on websites, or to visualize free form text."

tags = make_tags(get_tag_counts(YOUR_TEXT), maxsize=120)

create_tag_image(tags, 'cloud_large.png', size=(900, 600), fontname='Lobster')

Requirements: pygame, simplejson

 

 

[References]

https://pypi.python.org/pypi/pytagcloud/

'Python' 카테고리의 다른 글

Standard Error of the Mean Calculation in Python  (0) 2019.11.22
numpy.std  (0) 2019.11.22
scipy.ndimage.filters.gaussian_filter1d  (0) 2014.10.06
scipy.signal.argrelextrema  (0) 2014.10.06
scipy.signal.find_peaks_cwt  (0) 2014.10.05