Git Product home page Git Product logo

tagcloud's Introduction

Example of TagCloud

TagCloud

Tag clouds are very popular but seem to look always the same. TagCloud allows you to generate tag cloud images which base on an input word list and a shape image. It will try to fill the shape with the provided words and thereby choose a font size according to the weights.

Shapes can be provided a simple image files which have a clear foreground shape. You also can configure the colors which are used randomly for the words in the tag cloud.

This project bases on the impressive work of Processing and WordCram. The generated images are inspired by the examples at Tagxedo.

Installation

  1. a) Clone this repository and build the jar, e.g.

     $ ant -f tagcloud.xml
    

    b) Or use a prebuild tagcloud.jar from /build

  2. Place the jar in an directory and provide the following files (Sample can be used from this project root directory):

     \
     - tagcloud.jar       
     - input.txt          The input file containing the words and weights
     - shape.png          The shape file
     - config.properties  The configuration for the generation process (see sample in repository)
    

Usage

Provide a input.txt with an entry per line in the following format: WORD,COUNT. The WORD should not contain any , as this is used as a separator.

Example: input.txt

acceptation, 5.0
acceptance, 1.0
appreciation, 2.0
recognition, 3.0
compliment, 1.0
acknowledgement, 1.5
praise, 6.3

You also must provide a shape.png image. It should have a white background and a black foreground. The image dimensions should match the configured result dimensions (see config.properties).

Example: shape.png

Example of shape.png

Your directory should also include a config.properties file for the generation process. See the included file as an example.

Now you can start the generation process with:

$ java -jar tagcloud.jar

Per default the generated image will be written to out.png. TIFF, TARGA, JPEG, and PNG format are supported by determine the extension of the configure output file.

Headless: This project uses Processing which cannot be run without a frame buffer. The -D java.awt.headless=true trick doesn't work. In the project repository a simple shell script is included with can be used to generate an image on headless machines using Xvfb.

TODO

  • Allow configuration with command line arguments

License

TagCloud is distributed under MIT license. See LICENSE for details.

The official Processing.org's jars, used as dependencies, are distributed under LGPL and their code can be found on http://processing.org/

The official WordCram's jars, also used as dependencies, are distributes under Apache License and their code can be found on http://wordcram.org

tagcloud's People

Contributors

jnbt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.