Git Product home page Git Product logo

autotagger's Introduction

AutoTagger

This plugin will analyse the text of a form field, run it through the Yahoo Term Extraction Web Service and provides a list of signifiant words or phrases as tags.

Screenshot

How to use

First you must to include the JS files in the head of your HTML document.

    #HTML
    <script type="text/javascript" src="mootools-core.js"></script>
    <script type="text/javascript" src="Request.JSONP.js"></script>
    <script type="text/javascript" src="AutoTagger.js"></script>

In your JS.

   #JS
   (function($){
      window.addEvent('domready',function() {
         $('bt').addEvent('click',function() {
           new AutoTagger('context',{
               onComplete: function(tags) {
                  $('context').setStyle('opacity','1.0').removeClass('loading');                    
                  $('tags').set('value', tags);
               },
               onRequest: function(scriptSrc, scriptEl) {
                  $('context').setStyle('opacity','0.5').addClass('loading'); 
                  if(window.console) {console.log('make a request!'); }
               }
           }).send(); 
         });
      });
   })(document.id);

In your HTML.

   #HTML
   <div class="yui-g">
    <label for="context">Your message:</label>
    <textarea id="context">
      Mathematical analysis, which mathematicians refer to simply as analysis, has its beginnings in the rigorous formulation of infinitesimal calculus. It is a branch of pure mathematics that includes the theories of differentiation, integration and measure, limits, infinite series,[1] and analytic functions. These theories are often studied in the context of real numbers, complex numbers, and real and complex functions. However, they can also be defined and studied in any space of mathematical objects that has a definition of nearness (a topological space) or, more specifically, distance (a metric space).
    </textarea>
    <button id="bt">Get</button>
    <label for="tags">Tags:</label><input type="text" id="tags" />
    </div>

Notes:

You can view in action:

Requirements:

  • MooTools Core 1.3
  • MooTools More (Request.JSONP)

autotagger's People

Contributors

thinkphp avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.