jQuery Plugin To Generate Tags From A Given Text - tag-extract

jQuery Plugin To Generate Tags From A Given Text - tag-extract
File Size: 20.5 KB
Views Total: 521
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

tag-extract is a tag generation plugin used to extract, generate and stylize tags (keywords) that occur more frequently in a text content you specify. Ideal for automatically generates tags for your article and blog posts.

How to use it:

1. Make sure to load the jQuery tag-extract plugin's script after jQuery JavaScript library:

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="tag-extract.js"></script>

2. Initialize the plugin on your text container and done.

$('article').tagExtract();

3. Set the min/max number of tags you want to generate from your text.

$('article').tagExtract({
  max: 'auto',
  min: 3
});

4. Define an array of words you want to ignore.

$('article').tagExtract({
  ignored: ['the', 'be', 'to', 'of', 'and', 'a', 'in', 'that', 'have', 'I', 'it', 'for', 'not', 'on', 'with', 'he', 'as', 'you', 'do', 'at', 'this', 'but', 'his', 'by', 'from', 'they', 'we', 'say', 'her', 'she', 'or', 'an', 'will', 'my', 'one', 'all', 'would', 'there', 'their', 'what', 'so', 'up', 'out', 'if', 'about', 'who', 'get', 'which', 'go', 'me', 'when', 'make', 'can', 'like', 'time', 'no', 'just', 'him', 'know', 'take', 'person', 'into', 'year', 'your', 'good', 'some', 'could', 'them', 'see', 'other', 'than', 'then', 'now', 'look', 'only', 'come', 'its', 'over', 'think', 'also', 'back', 'after', 'use', 'two', 'how', 'our', 'work', 'first', 'well', 'way', 'even', 'new', 'want', 'because', 'any', 'these', 'give', 'day', 'most', 'us', 'were', 'was', 'has', 'less', 'more', 'is', 's', 'said', 'between', 'without', 'are', 'been', 'such', 'did', 'both', 'had', 'still', 'within']
});

5. Apply certain CSS classes to the generated tags.

$('article').tagExtract({
  clusters: ['label-primary', 'label-info', 'label-warning', 'label-danger']
});

6. Specify the target container in which you want to display the generated tags.

$('article').tagExtract({
  target: 'tags-container'
});

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