Skip to content

FieldDB/iLanguageCloud

 
 

Repository files navigation

iLanguageCloud

Generate interactive wordclouds for any language, with automatic stop word detection and ability to export as svg or png.

Getting Started

On the server

Install the module with: npm install ilanguage-cloud

var iLanguageCloud = require('ilanguage-cloud');
iLanguageCloud().render(); // returns a wordcloud object with default options

In the browser

Install the module with: bower install ilanguage-cloud --save

Or, download the production version or the development version.

In your web page:

<script src="ilanguage-cloud.min.js"></script>
<script>
  iLanguageCloud({text: 'A cloud is a visible mass ...'}).render(); // renders the text as a cloud to a div id="cloud" if exists
</script>

In your code, you can attach iLanguageCloud's methods to any object.

<script>
var exports = WordCloud;
</script>
<script src="ilanguage-cloud.min.js"></script>
<script>
WordCloud({text: 'A cloud is a visible mass ...'}).render();
</script>

Documentation

Optionally, you can pass an options object to iLanguageCloud.

<script>
  var myOptions = {
    element: 'cloud',
    text: 'A cloud is a visible mass of condensed droplets or frozen crystals suspended in the atmosphere.',
    font: 'FreeSans',
    stopWords: 'a is by in of the or'
  };
</script>
<script src="ilanguage-cloud.min.js"></script>
<script>
  iLanguageCloud(myOptions).render();
</script>

Examples

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

More details...

Release History

  • v1.0 Feb 9 2012 - Initial word cloud using CSS rotation in vanilla js
  • v2.0 Jan 29 2013 - WordPress plugin with SVG generation in vanilla js
  • v3.0 Nov 15 2013 - Switched to Jason Davies' d3-cloud to generate SVG Download on Google Play

License

Copyright (c) 2012-2014 iLanguageCloud Contributors. Licensed under the Apache 2.0 license.

About

An HTML5/Android word cloud generation codebase

Resources

Stars

Watchers

Forks

Packages

No packages published