Demo for natural language processing

This page uses Cognitive AI for a demo using natural language for the towers of Hanoi. Type your command into the following input field and hit the Enter key to send it. More details are given below. See also the game in full

Log:



Facts graph:



Rules graph:



Commands

You can enter commands like the following:

move the red disc to the right peg
move the green disc to the middle peg
move the red disc to the middle peg
move the blue disc to the right peg
move the red disc to the left peg
move the green disc to the right peg
move the red disc to the right peg

Explanation

See also information on chunks and rules.

This demo was chosen as a minimal starting point for further elaboration in future demos.

Natural language understanding (NLU) is modelled as a combination of parsing plus asynchronous cognitive reasoning. The demo ignores punctuation and upper/lower case distinctions, simulating hearing. This is motivated by the observation that spoken language evolved a million years before written language. On Chrome, a microphone button is shown, and you can click or tap the button, then speak the command, and when it is shown, and if it looks okay, hit the Enter key to parse and execute the command.

The vocabulary for this demo, whilst small, includes a determiner (the), adjectives (red, green, blue, left, middle, right), nouns (disc, peg), preposition (to) and verb (move).

As an example, the utterance "move the red disc to the right peg" is mapped incrementally word by word to the following word graph:

verb v1 {word move; subject p1; to p2}
np p1 {noun disc; det the; adj red}
np p2 {noun peg; det the; adj right}

This is passed to the rule engine and mapped to the following:

move m1 {disc disc3; from peg1; to peg3}

Future demos will switch to concurrent processing of syntax and semantics, as is necessary to resolve the abundant ambiguity in natural language.

Dave Raggett <dsr@w3.org>


This work is supported by the European Union's Horizon 2020 research and innovation programme under grant agreement No 780732 for project Boost 4.0, which focuses on smart factories.