Calculate Word Count And Average Word Length - Text Analyzer

Calculate Word Count And Average Word Length - Text Analyzer
File Size: 2.9 KB
Views Total: 121
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A small jQuery based online Text Analyzer Tool to show the detailed statistics of your text: word count, unique word count, and average word length.

How to use it:

1. Create a textarea to accept the text you'd like to analyze.

<form class="js-text-form">
  <div>
    <label for="user-text">Text to analyze</label>
    <textarea id="user-text" name="user-text" placeholder="Paste Your Text Here" required></textarea>
  </div>
  <div>
    <button type="submit">Analyze it!</button>
  </div>
</form>

2. Create the HTML for the the detailed statistics of your text.

<dl class="hidden text-report js-text-report">
  <dt>Word count</dt>
  <dd class="js-word-count"></dd>

  <dt>Unique word count</dt>
  <dd class="js-unique-word-count"></dd>

  <dt>Average word length</dt>
  <dd class="js-average-word-length"></dd>
</dl>

3. Download the plugin and import the app.js into the web page and done.

<!-- jQuery -->
<script src="/path/to/cdn/jquery.min.js"></script>
<!-- link to your app.js -->
<script src="/path/to/app.js"></script>

This awesome jQuery plugin is developed by amarttala. For more Advanced Usages, please check the demo page or visit the official website.