Dialogue System Development Pontus Johansson NLPLAB, Linköping University
GSLT - Dialogue Systems Outline Iterative Dialogue System Development NlpFarm: A Development Environment
Iterative Development
GSLT - Dialogue Systems Problems With DS Development Overhead of extensive planning Overhead of ’monolithic’ architectures Knowing what to do and how?? Our approach: Iterative method
GSLT - Dialogue Systems Iterative Method Design and implementation in parallel Takes stock of resources Clear development space Incremental development of functionality Minimize planning of work that turns out to be unnecessary…
GSLT - Dialogue Systems Method Overview DS designDS module DS theory DS requirements specification Other modulesDS framework Conceptual design Framework customisation
GSLT - Dialogue Systems Development Space Tools Code patterns Modularisation Interfaces Knowledge representation Framework templates Dialogue history Atomic request handling Sub-dialogue control X X X X X X X X X X X X XX X X X X X X X XX X X X X DS Framework Customisation DS Design DS Capabilities
GSLT - Dialogue Systems Applying the Iterative method Iteration 1: Q/A-system Iteration 2: Dialogue history Iteration 3: Sub-dialogue Q/A: U: List actors in Star Wars S: [Marc Hamill, Harrison Ford, …] U: Who directed Star Wars? S: George Lucas Dialogue history: U: Who is starring in the Bond movie? S: Sean Connery U: And who directed it? S: Guy Hamilton Sub-dialogue: U: Show all movies today S: There are 30 shows that matches. Do you wish to see them all? U: Nah, only the ones after nine pm S: [ TABLE ]
GSLT - Dialogue Systems Resources Lars Degerstedt and Arne Jönsson. A Method for Iterative Implementation of Dialogue Management. IJCAI Workshop on Knowledge and Reasoning in Practical Dialogue Systems, Seattle, Lars Degerstedt and Arne Jönsson. Iterative Implementation of Dialogue System Modules. Proceedings of Eurospeech Aalborg, Denmark, Pontus Johansson, Lars Degerstedt and Arne Jönsson. Iterative Development of an Information-Providing Dialogue System. Proceedings of the 7th ERCIM Workshop "User Interfaces for All”. Paris, France, 2002.
NlpFarm
GSLT - Dialogue Systems Aims and Motivation Contribute to an open source framework for NLP. Aims at being a channel for research results to transform into working software. Library and framework code Running systems and demos
GSLT - Dialogue Systems Aims and Motivation The nlpFarm is open to anyone and will in particular: host various demo systems showing the strength of NLP software. be a channel for student projects (both undergraduate and graduate) to distribute their results. facilitate the administrative overhead for such projects by reuse from earlier efforts. be the home site for tools and frameworks developed under longer time periods in various research projects. be a host for NLP applications based on NLP research software. be a channel for industrial partners and other interesting parties to download and try out existing NLP research resources.
GSLT - Dialogue Systems
GSLT - Dialogue Systems Tool example: JavaChart Chartparser written in Java Stand-alone (command line interface) Or, as part of e.g. a dialogue system Uses the Feature Structure package of the nlpLib Java library.
GSLT - Dialogue Systems Library example: nlpLib Includes utilities such as: Unifiable Feature Structures Phased Language Process (PLP) design pattern Library for text generation The PLP pattern suits the iterative method
GSLT - Dialogue Systems Phased Language Processing (PLP)
GSLT - Dialogue Systems Phased Language Processing (PLP) + Decoupling control code + Easy addition and removal of phases + Providing a unified API for the process control of the system + Low overhead in design and implementation - The Phase Graph can be too complex - Use of the state as the only transfer of data can become a bottle-neck
GSLT - Dialogue Systems Iterations and Increments Two incremental iterations Iteration 1 re-uses design from TvGuide Iteration 2 consists of adding phases from BirdQuest and refactoring the system to be able to merge and refine the newly added phases with those from increment 1. The final design of increment 2 thereby gets a pure phase design.
GSLT - Dialogue Systems Re-using libs and tools Design a simple set of phases (PLP pattern in nlpLib library) for a Q/A (first iteration) 1. Parse Phase 2. Database Access Phase 3. Generation Phase Use JavaChart tool for parse phase Use Quaks framework for DB access phase Use nlpLib.tgen library for generation phase (see BirdQ and TvGuide demos)
GSLT - Dialogue Systems Implementing a simple PLP ParsePhaseAccessPhaseGenerationPhase The 3 phases are ordered in a ”pure phase graph” INOUT
GSLT - Dialogue Systems Implementing a simple PLP package tvguide.process; import opennlp.nlplib.plp.*; public class TvGuidePlp { PhaseProcessor pp; public TvGuidePlp() { ParsePhase p1 = new ParsePhase(); AccessPhase p2 = new AccessPhase(); GenerationPhase p3 = new GenerationPhase(); Phase[] ordering = {p1, p2, p3}; PurePhaseGraph graph = new PurePhaseGraph(ordering); this.pp = new PhaseProcessor(graph); }//constructor …
GSLT - Dialogue Systems Configuring the ParsePhase Create a class ParserClient, which communicates with JavaChart Simple method parse: public FeatureStructure parse(String userInput) { Map m = jc.parse(userInput.trim()); //jc is the JavaChart ”server” List l = (List) m.get("s"); //s is top category in grammar if (!l.isEmpty()) { return (FeatureStructure) l.get(0); //FeatureStructure is part of nlpLib } else { return null; } }
GSLT - Dialogue Systems Using Quaks for DB Queries opennlp.Quaks.access: support for access sessions against a KS. Currently (0.1.0) supports: MySql "ordinary" URL sources opennlp.Quaks.query: support for building queries for database resources. Supported: MySql. opennlp.Quaks.template: Contains a Controller-holder pattern for query template handling. Implements a generic so-called access carrier for template-based access using the access package.
GSLT - Dialogue Systems Using Quaks for DB Queries BirdQ uses MySql queries TvGuide uses URL queries (Internet Movie Database)
GSLT - Dialogue Systems tGen for Text Generation BirdQ demo shows how to use opennlp.nlplib.tgen for text generation
GSLT - Dialogue Systems Resources NlpFarm home page NlpFarm projects: Sourceforge