Posts Tagged ‘bluemix’

IBM Watson Retrieve and Rank tool

Thursday, June 30th, 2016

A few months ago, I mentioned that I was starting a new project. In this post, I’ll explain what we’ve been working on and what we’re trying to achieve with it.

The project was to build something new: a self-serve web-based tool to enable training the IBM Watson Retrieve and Rank service.

Earlier today, we released a first version of the tool. Now it’s finally out there, I can share what I’ve been working on!


My video walkthrough of the IBM Watson Retrieve and Rank tool

(more…)

Watson Rock, Paper, Scissors

Sunday, June 26th, 2016

A simple hands-on activity to let kids train a machine learning classifier to be able to play Rock, Paper, Scissors.

Screen Shot 2016-06-26 at 13.59.20

I’ve written and spoken before that I think we should do more to introduce children to the idea of machine learning. And I’ve tried introducing my two kids to it, such as by making a Code Club-style game with them: we built a system to play Guess Who, that they trained both to understand what you say and to recognise the characteristics of faces from photos.

This weekend, we tried out another idea – Rock, Paper, Scissors from a web app, using the web cam to see your moves, and training a system to recognise your hand signs.

DSC06146

(more…)

Connecting to MQ Light from a web app via WebSockets

Monday, May 25th, 2015

How to subscribe to MQ Light notifications from a web app, via a WebSockets bridge

I’ve been working on a microservices app hosted on Bluemix. It’s one logical app, but it’s implemented and deployed as a bunch of separate Bluemix applications, each with it’s own separate responsibility.

I’m using MQ Light as asynchronous messaging between the apps. Each Bluemix app publishes notifications about changes to resources, and the status of long-running tasks.

mqlight on Bluemix

I won’t labour why or how we do this here, as it’s well covered in many other posts on microservices. For example:

…publish everything, however boring and insignificant it may seem to the rest of the system. Publishing is very lightweight and the publisher does not need to know whether 0 or 1000 other services are interested in that particular event, just fire and forget. This is extremely powerful and is what enables microservices to be built and deployed extremely quickly…

This is working well, but I also want a web app to be able to get some of these notifications.

If the web app has a resource open for editing, I want it to get a push notification if there are any changes to the resource.

If the web app started a long-running task, I want it to get push notifications of status changes.

I’ve done this by writing a small proxy, allowing a web app to subscribe to MQ Light topics and get the message via WebSockets.

Essentially, it’s an mqlight-WebSockets bridge.

mqlight with WebSockets on Bluemix

(more…)

How to use the IBM Watson Relationship Extraction service on Bluemix

Sunday, January 25th, 2015

Before Christmas, I wrote about how I used the Watson Relationship Extraction service on Bluemix to pick out the things mentioned in news stories, as part of a mobile app we built on a hackday. I’d still like to do something more with that app, but in the meantime I should at least share how I did the Relationship Extraction bit.

From the official doc for the service:

From unstructured text, Relationship Extraction can extract entities (such as people, locations, organizations, events), and the relationships between these entities (such as person employed-by organization, person resides-in location).

This is provided as a hosted service on IBM Bluemix where any developer can sign up and give it a try.

It’s available as a documented REST API, but as part of using it in the hackday, I needed to write a bit of code around that, just to prepare the request and parse the response. I think it’ll save me time to reuse this the next time I want to build something with the API, so I’m sharing it as a standalone package.

In this post, I’ll walk though how you can use it, with a small app that grabs the contents of a BBC News story and picks out the names of people mentioned in the story.

(more…)

Text analytics in BlueMix using UIMA

Sunday, April 13th, 2014

In this post, I want to explain how to create a text analytics application in BlueMix using UIMA, and share sample code to show how to get started.

First, some background if you’re unfamiliar with the jargon.

What is UIMA?

UIMA (Unstructured Information Management Architecture) is an Apache framework for building analytics applications for unstructured information and the OASIS standard for content analytics.

I’ve written about it before, having used it on a few projects when I was in ETS, and on other side projects since such as building a conversational interface to web pages.

It’s perhaps better known for providing the architecture for the question answering system IBM Watson.

What is BlueMix?

BlueMix is IBM’s new Platform-as-a-Service (PaaS) offering, built on top of Cloud Foundry to provide a cloud development platform.

It’s in open beta at the moment, so you can sign up and have a play.

I’ve never used BlueMix before, or Cloud Foundry for that matter, so this was a chance for me to write my first app for it.

A UIMA “Hello World” for BlueMix

I’ve written a small sample to show how UIMA and BlueMix can work together. It provides a REST API that you can submit text to, and get back a JSON response with some attributes found in the text (long words, capitalised words, and strings that look like email addresses).

The “analytics” that the app is doing is trivial at best, but this is just a Hello World. For now my aim isn’t to produce a useful analytics solution, but to walk through the configuration needed to define a UIMA analytics pipeline, wrap it in a REST API using Wink, and deploy it as a BlueMix application.

When I get a chance, I’ll write a follow-up post on making something more useful.

You can try out the sample on BlueMix as it’s deployed to bluemix.net

The source is on GitHub at github.com/dalelane/bluemixuima.

In the rest of this post, I’ll walk through some of the implementation details.

(more…)