steve's blog

 
Tuesday, August 4, 2009 - 16:17

Yahoo's Term Extraction service is a cool API, which takes a block of text and returns a list of keywords taken from it. That makes it very useful for automatically generating tags for your content, especially when your users don't bother to do it themselves! It has other uses too - I'm working on an AI chatter bot which uses Term Extraction to try and figure out what you're talking about.

If you Google it you'll find plenty of examples of how to use Yahoo Term Extraction in PHP, which would be the standard way, as Yahoo prefers you to query the service with a POST request. However, it will still accept a GET request, and the API will return JSON...

Monday, August 3, 2009 - 12:15

I'm going to skip the introductions and make the inaugural post on this new blog something useful; a short and sweet Drupal module that comes in handy if you're using FeedAPI to import a YouTube RSS feed.

The description field in YouTube's RSS feed is rather unpleasant. You would expect it to contain the description entered by the video's owner when they uploaded it, but you would be wrong. It's actually full of HTML formatted meta-information including a thumbnail image, title, description, running time, view count, rating, etc. It's also laid out using divs and tables, which is really going to break your Drupal...

Info on upcoming projects, plus tips and tricks in PHP, Drupal and Javascript.