Will's avatar

⬅️ See more posts

CENode

22 June 2017 (5 minute read)

🔮 This post is also available via Gemini.

cenode javascript cardiffuniversity ibm ita research

Whilst working on the ITA Project - a collaborative research programme between the UK MoD and the US Army Research Laboratory - over the last few years, one of my primary areas has been to research around controlled natural languages, and working with Cardiff University and IBM UK’s Emerging Technology team to develop CENode.

As part of the project - before I joined - researchers at IBM developed the CEStore, which aims to provide tools for working with ITA Controlled English. Controlled English (CE) is a subset of the English language which is structured in a way that attempts to remove ambiguity from statements, enabling machines to understand ‘English’ inputs.

Such a language was developed partly to support multi-agent systems consisting of a mixture of humans and machines, and to allow each agent to be able to communicate with one another using the same protocol in coalition scenarios. In these systems, there may be agents on the ground who submit information to the CEStore in CE, which is able to parse and understand the inputs. The CEStore may then pass the information on to other interested parties or may give an agent (such as a drone, camera, sensor, or other equipment) a task (follow, intersect, watch, etc.) based on the complement of the existing knowledge and the new input.

An old example we use combines the CEStore with a system capable of assigning missions to sensors or equipment (see this paper). This example focuses on ‘John Smith’, who is known to the CE system as a HVT (high-value target) owning a black car with licence plate ‘ABC 123’. A human agent on the ground may later observe a speeding car and issue information into the system through an interface on their mobile device or via a microphone;

there is a car named car1 which has black as colour and has 'ABC 123' as licence plate and is travelling north on North Road

The system receiving the message can put together that this speeding car most likely contains John Smith (since it’s known that he owns a car with this licence plate), and so can task a nearby drone to follow it based on the coordinates of the road and the direction of travel.

A human agent being able to type or speak this precise type of English is unlikely, particularly in emergency or rapid-response scnearios, and so the CEStore has a level of understanding of ’natural’ language, and is able to translate many sentences from natural language English into CE - enabling agents to, largely, speak in a more native fashion.

The usefulness of the CEStore project led us to consider possibilities of a (lighter) version of a CEStore that could run on mobile devices in a decentralised network of CE-capable devices without relying on a centralised node responsible for parsing and translating all CE inputs. Such a system would also have the benefit of supporting a network of distributed ’nodes’, each with the ability to maintain their own distinct knowledge bases and to understand and ‘speak’ CE - and thus the concept for CENode was produced.

A key motivation for this was to support those agents who may not have a consistent network connection to a central server, but who still need knowledge support and the ability to report information - thus building the local knowledge base and improving inferences. Then, once the agent can re-establish a connection to other nodes, new information can propagate through the network.

The CENode project (with source hosted on GitHub) began with a focus on supporting our SHERLOCK experiments, which had traditionally been powered using the CEStore. Using CENode, users of SHERLOCK experienced benefits such as auto-correct and typing suggestions, the ability to continue working offline (with information syncing when a network is re-established), and the display of a personalised ‘dashboard’ indicating the local agent’s view of the world represented by the game.

The SHERLOCK experiment was even covered by the BBC.

Since then, the CENode project has grown, and many of the features enjoyed by the CEStore (which is written in Java and deployed using Apache Tomcat) have been re-implemented for CENode. The library supports rules that fire given specific inputs, simple natural language understanding and parsing, querying through CE inputs, the CE cards blackboard architecture, and policies - enabling CENode instances to communicate with each other in different topologies.

CENode is written in JavaScript, since this allows it to be downloaded to and cached on any JavaScript-supporting browser (for example, on a mobile phone or tablet), and to run as a Node app.

In addition to using the CE-based (‘cards’) interfaces, CENode can be interacted-with using the JavaScript bindings and can expose RESTful APIs when run as a Node app, enabling several types of CENode deployments to work together as part of a single system.

Check out a demo of the library here, which wraps a simple user interface around the library’s JavaScript bindings. In the demo, the local CENode agent is preloaded with some knowledge about planets and stars. Try asking it questions or teaching it something new. Additionally, we have deployed a service called CENode Explorer which can launch cloud-based CENode instances and allows you to browse the knowledge base.

We hope to continue to maintain CENode as part of the project, and to discover more interesting use-cases. There are already clear pathways for its use in voice assistants, bots, and as a protocol for communication in IoT devices (some work for which is already underway). Those interested in developing with the library can get started using the CENode Wiki.

✉️ You can reply to this post via email.

📲 Subscribe to updates

If you would like to read more posts like this, then you can subscribe via RSS.