CNL for Robots - Grammatical...

24
Robots Controlled Natural Language Building a CNL for Robots with GF References CNL for Robots Mike Rosner Dept ICS, University of Malta GF Summer School, Fraueninsel August 2013 Mike Rosner Dept ICS, University of Malta CNL for Robots 1/ 24

Transcript of CNL for Robots - Grammatical...

Page 1: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

CNL for Robots

Mike RosnerDept ICS, University of Malta

GF Summer School, FraueninselAugust 2013

Mike Rosner Dept ICS, University of Malta CNL for Robots 1/ 24

Page 2: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Background

Long term goal: contribute to interdisciplinary research acrossCS, Engineering and Linguistics

Institute of Linguistics (P. Paggio - Multimodality)Faculty of ICT, Dept Intelligent Computer Systems (R. Wood,Social Robots)Faculty of Engineering, Department of Control Engineering (S.Fabri - Robot Control)

MSc Human Language Technology, University of Malta

Short term goal: identify course topics that can act as avehicle for a wide range of advanced HLT issues.Language and embodied agents will explore relation betweenNL and various agents including robots

Mike Rosner Dept ICS, University of Malta CNL for Robots 2/ 24

Page 3: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Outline

1 RobotsBasic Characteristics of Robots

2 Controlled Natural LanguageProposal: a CNL for Robots

3 Building a CNL for Robots with GF

Mike Rosner Dept ICS, University of Malta CNL for Robots 3/ 24

Page 4: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Robots

Grounded in real physical world

BodiesSensorsEffectors

Autonomy

Goal orientationRole of reasoning and planningVariable level of autonomy

Interactivity

ModalityContentDirection

Mike Rosner Dept ICS, University of Malta CNL for Robots 4/ 24

Page 5: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Existing Robot Problem Domains

Urban search and rescue:use of robots in rescue and recovery efforts.

Assistive robotse.g. to visually challenged humans. Assistance with physicaltherapies; intelligent wheelchairs.

Entertainmente.g. robotic dance partners, robotic pets

Military and Police (work that is “dull, dirty or dangerous”)e.g. bomb disposal

Space Explorationlanding site surveillance

Issue: are there common subtasks?

Mike Rosner Dept ICS, University of Malta CNL for Robots 5/ 24

Page 6: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Language-Mediated Interaction

Understanding high level instructions

Reporting visual and other observations

Interaction via dialogue strategies

Mike Rosner Dept ICS, University of Malta CNL for Robots 6/ 24

Page 7: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

A Common Underlying Theme: Understanding DirectionalLanguage

Input

With your back to the windows, walk straight through the doornear the elevators. Continue to walk straight, going through onedoor until you come to an intersection just past a white board.Turn left, turn right, and enter the second door on your right

Output

Compute intended path through the environment

Mike Rosner Dept ICS, University of Malta CNL for Robots 7/ 24

Page 8: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Why Direction Understanding is Important

Several reasons given by Kollar et al. (2010)

Following directions requires the ability to understand spatiallanguage

A system that understands directions is useful in manydifferent domains concerning use of robots

It is natural to ask humans to create a set of directions:potential for open-ended yet task constrained corpus oflanguage

Correctness metric: does robot arrive at final destination?

Mike Rosner Dept ICS, University of Malta CNL for Robots 8/ 24

Page 9: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Pappu and Rudnicky (2012)

Collected a corpus of spoken instructions provided by subjectsprovided with an origin and a destination

Instructions classified into four categories:

1 Imperative Instructions: executable and can result in physicaldisplacement

2 Advisory Instructions: mention of landmarks that are notactually on the path but serve as waypoints

3 Grounding Instructions: these report absolute position4 Meta Comments: these are non-executable instructions often

added at the beginning of, or in between imperativeinstructions

Mike Rosner Dept ICS, University of Malta CNL for Robots 9/ 24

Page 10: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Basic Characteristics of Robots

Examples of Instruction Types (Pappu and Rudnicky, 2012)

A grammar was designed to covered the information-bearinginstructions

Conclusion: reasonable, but only partial coverage (78%)

Mike Rosner Dept ICS, University of Malta CNL for Robots 10/ 24

Page 11: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

Controlled Natural Language (CNL)(Kuhn, 2013)

1 CNL is based on exactly one natural language (its “baselanguage), but it is more restrictive concerning lexicon,syntax, and/or semantics.

2 CNL preserves most of the natural properties of its baselanguage, so that speakers of the base language can intuitivelyand correctly understand texts in the CNL, at least to asubstantial degree.

3 CNL is constructed, which means that it is explicitly andconsciously defined, and is not the product of an implicit andnatural process (even though it is based on a natural languagethat is the product of an implicit and natural process).

Mike Rosner Dept ICS, University of Malta CNL for Robots 11/ 24

Page 12: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

What are Controlled Natural Languages Used For?

Kuhn identifies three main purposes

1 To improve communication among humans, especiallyspeakers with different native languages.

Example: Basic English (Ogden, 1930): 850 English rootwords; 18 verbs.

2 To improve manual, computer-aided, semi-automatic, orautomatic translation;

Example: Caterpillar Technical English (Kamprath et al.,1998). Goal: to improve translation quality and reducetranslation costs with the help of machine translation.

3 To provide a natural and intuitive representation for formalnotations.

Example: Attempto Controlled English (Fuchs et al., 2008).Produces Discourse Representation Structures.

Mike Rosner Dept ICS, University of Malta CNL for Robots 12/ 24

Page 13: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

Examples

Basic English

The camera man who made an attempt to take a moving pictureof the society women, before they got their hats off, did not get offthe ship till he was questioned by the police.

CTE

This category indicates that an alternator is malfunctioning. If theindicator comes on, drive the machine to a convenient stoppingplace. Investigate the cause and determine the solution.

ACE text

A customer owns a card that is invalid or that is damaged. Everycontinent that is not Antarctica contains at least 2 countries.

Mike Rosner Dept ICS, University of Malta CNL for Robots 13/ 24

Page 14: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

Key Properties Kuhn (2013)

Kuhn surveyed over 100 CNLs based on English

Code PropertyC The goal is comprehensibilityT The goal is translationF The goal is formal representation

(including automatic execution)

W The language is intended to be writtenS The language is intended to be spokenD The language is designed for a specific narrow domainA The language originated from academiaI The language originated from industryG The language originated from a government

Mike Rosner Dept ICS, University of Malta CNL for Robots 14/ 24

Page 15: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

PENS Classification Scheme (Kuhn, 2013)

Based on four inherent characteristics

PrecisionExpressivenessNaturalnessSimplicity

Example: ACE P4E 3N4S3, FWA

Mike Rosner Dept ICS, University of Malta CNL for Robots 15/ 24

Page 16: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Proposal: a CNL for Robots

Proposal: CNL for Robots

Scope: the language has two main purposesExpression of directional instructions involving complex spatialand object descriptions

Go into the kitchen and fetch the sugar behind the cereal onthe second shelf of the cupboard.Enter the building and go up to the first floor. Follow thecorridor round to the right and open the third door on the left.

Synthesis of spatial descriptions

Human: describe the sceneRobot: There is a pile of rubble in front of me. A person istrapped under a fallen beam on my left.

Inherent characteristicsT: translatabilityF: formal representations

Various PENS considerations

Mike Rosner Dept ICS, University of Malta CNL for Robots 16/ 24

Page 17: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

CNL for Robots - why GF?

Underlying semantics can be represented as a tree which couldbe used for different purposes

For translation to another languageFor subsequent interpretation, e.g. execution to producebehaviours, or graphical output in the form of a diagram.

MARCO (Macmahon et al., 2006) is an agent that followsfree-form, natural language route instructions by representingand executing a sequence of compound action specificationsthat model which actions to take under which conditions.

Tree representation used could be modelled with GF’s abstractsyntax

Mike Rosner Dept ICS, University of Malta CNL for Robots 17/ 24

Page 18: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Macmahon et al. (2006)

Mike Rosner Dept ICS, University of Malta CNL for Robots 18/ 24

Page 19: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

A Concrete Strategy

Easy - achievable during Summer School1 Choose an already existing robot command language2 Design abstract syntax in GF reflecting meanings of commands3 Design concrete syntaxes for different NLs4 Achieve NL translation

Medium difficulty project1 Design a simulator that executes requested actions2 Develop an interpreter that interprets complex commands

Harder projects

Linking to the command language of a real robotVision → language descriptions

Mike Rosner Dept ICS, University of Malta CNL for Robots 19/ 24

Page 20: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Where to begin?

Winograd’s SHRDLU Blocks World Language (Winograd,1972)

Example sentences

Pick up a big red blockFind a block which is taller than the one you are holding andput it in the boxHad you touched any pyramid before you put the little greenone on the little cube?

Mike Rosner Dept ICS, University of Malta CNL for Robots 20/ 24

Page 21: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Conclusion

NLP has a practically unbounded role to play inHuman/Robot interaction.

The field is comparatively unexplored. There are manypossible applications.

To make long-tern progress there is a need to focus: spatiallanguage and related actions

GF is an ideal formalism for the design of an appropriate CNLdue to multi-purpose abstract syntax

Starting point for Summer School project: blocks worldlanguage

Mike Rosner Dept ICS, University of Malta CNL for Robots 21/ 24

Page 22: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Bibliography I

Fuchs, N. E., Kaljurand, K., and Kuhn, T. (2008). AttemptoControlled English for Knowledge Representation. In Baroglio,C., Bonatti, P. A., Ma luszynski, J., Marchiori, M., Polleres, A.,and Schaffert, S., editors, Reasoning Web, Fourth InternationalSummer School 2008, number 5224 in Lecture Notes inComputer Science, pages 104–124. Springer.

Kamprath, C., Adolphson, E., Mitamura, T., and Nyberg, E.(1998). Controlled language for multilingual documentproduction: Experience with caterpillar technical english.

Mike Rosner Dept ICS, University of Malta CNL for Robots 22/ 24

Page 23: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Bibliography II

Kollar, T., Tellex, S., Roy, D., and Roy, N. (2010). Towardunderstanding natural language directions. In Proceedings of the5th ACM/IEEE international conference on Human-robotinteraction, HRI ’10, pages 259–266, Piscataway, NJ, USA. IEEEPress.

Kuhn, T. (2013). A survey and classification of controlled naturallanguages. Computational Linguistics.

Macmahon, M., Stankievicz, B., and Kuipers, B. (2006). Walk thetalk: Connecting language, knowledge, and action in routeinstructions. In In Proc. of the Nat. Conf. on ArtificialIntelligence (AAAI, pages 1475–1482.

Ogden, C. K. (1930). Basic English: a general introduction withrules and grammar. Paul Treber and Co.

Mike Rosner Dept ICS, University of Malta CNL for Robots 23/ 24

Page 24: CNL for Robots - Grammatical Frameworkschool.grammaticalframework.org/2013/slides/mike-rosner.pdf · C The goal is comprehensibility ... translatability F: formal representations

RobotsControlled Natural Language

Building a CNL for Robots with GFReferences

Bibliography III

Pappu, A. and Rudnicky, A. I. (2012). The structure andgenerality of spoken route instructions. In SIGDIAL Conference,pages 99–107. The Association for Computer Linguistics.

Winograd, T. (1972). Understanding Natural Language. AcademicPress.

Mike Rosner Dept ICS, University of Malta CNL for Robots 24/ 24