This example demonstrates a simple use case for the Yahoo Term Extraction API helper script. You can grab the script here:
The API can only be accessed via HTTP POST, so a server-side proxy is required. You can download a sample proxy file here:
The script used here builds upon the YUILoader/Dom/Event core:
var te = new YAHOO.api.TermExtractor({
contextEl: "context",
proxy: "/content/php/proxy.php"
});
te.onComplete.subscribe(function(o) {
document.getElementById("terms").innerHTML = o.terms.join(", ");
});
YAHOO.util.Event.on("extract", "click", te.extract, te, true);