Category Archives: Code

Term Extraction in PHP

The new version of the term extraction tool on is now in PHP. Read the blog post explaining what’s new. For anyone looking for a simple way to carry out term extraction on English text using PHP, here’s a snippet using the PHP port of Topia’s Term Extractor: require ‘TermExtractor/TermExtractor.php’; $text = ‘Politics is […]

Posted in Code | Comments closed

PHP DOMDocument replace DOMElement contents with HTML string

This is another StackOverflow answer I’m moving over to my blog. AWinter asked: Using PHP I’m attempting to take an HTML string passed from a WYSIWYG editor and replace the children of an element inside of a preloaded HTML document with the new HTML. So far I’m loading the document identifying the element I want […]

Posted in Code | Comments closed

Clean up HTML on paste in CKEditor

We use CKEditor at for our PastePad service. The idea is to allow users to paste content that’s not currently publically available on the web for processing with one of our web tools. This can be content that’s in a Word document, an email, or behind a paywall. CKEditor can automatically clean up HTML […]

Posted in Code | Comments closed

Processing JS plugin update

I’ve just updated the Processing JS WordPress plugin to use Processing.js 1.0. Thanks to digitalawakening for posting update instructions. I was happy to learn last month that the plugin is being used on Golan Levin’s course Interactive Art & Computational Design at Carnegie Mellon University. See Processing Embedding.

Also posted in General | Tagged , , | Comments closed

PHP Port of Arc90’s Readability

Update 2011-03-23: Readers may also be interested in how we use PHP Readability at Content Extraction at Last year I ported Arc90’s Readability to use in the Five Filters project. It’s been over a year now and Readability has improved a lot — thanks to Chris Dary and the rest of the team […]

Posted in Code | Tagged , , | Comments closed