| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Generate interactive wordclouds for any language, with automatic stop word detection and ability to export as svg or png.
Install the module with: npm install ilanguage-cloud
var ILanguageCloud = require('ilanguage-cloud').ILanguageCloud;
var myCloud = new ILanguageCloud({text: 'A cloud is a visible mass ...'});
myCloud.render();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>
var myCloud = new ILanguageCloud({text: 'A cloud is a visible mass ...'});
myCloud.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>
new WordCloud({text: 'A cloud is a visible mass ...'}).render();
</script>You can also specify many options on the cloud, for example how the cloud should be analyzed, and in which element it should render.
var myOptions = {
element: document.getElementById('anyElementCanBePassedIn'),
orthography: 'A cloud is a visible mass of condensed droplets or frozen crystals suspended in the atmosphere.',
morphemes: 'A cloud is a visible mass of condense-ed drop-let-s or frozen crystal-s suspend-ed in the atmosphere.',
font: 'FreeSans',
nonContentWords: 'a is by in of the or'
};
var cloud = new ILanguageCloud(myOptions);
cloud.render();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 the scripts in package.json.
Copyright (c) 2012-2017 iLanguageCloud Contributors. Licensed under the Apache 2.0 license.
| Back | FazBrowse Home | New Git URL |