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.
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 is a Chief Interim Data Scientist via his Mor Consulting. Sign-up for Data Science tutorials in London and to hear about his data science thoughts and jobs. He lives in London, is walked by his high energy Springer Spaniel and is a consumer of fine coffees.