About

Ian Ozsvald picture

This is Ian Ozsvald's blog (@IanOzsvald), I'm an entrepreneurial geek, a Data Science/ML/NLP/AI consultant, author of O'Reilly's High Performance Python book, co-organiser of PyDataLondon, a Pythonista, co-founder of ShowMeDo and also a Londoner. Here's a little more about me.

High Performance Python book with O'Reilly

View Ian Ozsvald's profile on LinkedIn

ModelInsight Data Science Consultancy London Protecting your bits. Open Rights Group

Archive

12 December 2009 - 23:13ConceptNetDaily Twitter Bot

I’ve just launched my second Twitter bot – @ConceptNetDaily takes a random concept from the A.I. site ConceptNet and posts it to Twitter with a link back to the site. A tweet looks like:

“When humans own horses, humans groom and ride horses.” http://tinyurl.com/ydvf7vg

The TinyURL expands out to an address like: http://openmind.media.mit.edu/en/assertion/143313/

The aim of the site is to build a large repository of common-sense knowledge, exactly the kind of knowledge that humans take for granted and never write down as statements for a computer to understand.  Currently it tracks over 1,026,553 statements.

Using the link you can vote on the concept.  Vote up if the concept is solid (i.e. something a human would say is ‘right’) or down if it is wrong, silly or erroneous.  The site supports OpenID which makes starting a touch easier.

My goal with this bot is to remind people every day to vote on the concepts and to add new knowledge.  If a concept has many votes then we can have faith that it is ‘common-sense knowledge’.  If a concept is voted down enough then we can have faith that it is ‘unhelpful or wrong’.

You’ll find a searchable list of Concepts and some random examples on the English homepage.  For good examples see all the information that ConceptNet knows about humans, chess and girls.

Details:

I’ve written the bot in Python using PyYAML, Python-tinyurl and Python-twitter.  It runs every day via a cron job.  It works by guessing a random id for a raw_assertion and checking to see if a concept lives at the URL.  See this XML example for id 143313, I extract the .yaml version via PyYAML but the .xml version renders nicely in your browser if you want a peek.

ConceptNet’s web API is well documented.  ConceptNet itself is written in Python using Django but I’m not using the downloaded version here, just the web API.

My first Twitter bot – @BrightonJobDoom:

Just in case you live here in Brighton you might want to track @BrightonJobDoom to see how healthy (or…not) the job market is in the UK during this rather wobbly recession 🙂  I wrote this bot for our £5 App’s 5k coding competition.


Ian applies Data Science as an AI/Data Scientist for companies in ModelInsight, sign-up for Data Science tutorials in London. Historically Ian ran Mor Consulting. He also founded the image and text annotation API Annotate.io, co-authored SocialTies, programs Python, authored The Screencasting Handbook, lives in London and is a consumer of fine coffees.

No Comments | Tags: ArtificialIntelligence, Life, £5 App Meet

Comments are closed.