View
218
Download
0
Tags:
Embed Size (px)
Citation preview
GSLT - Dialogue Systems 2 2 030128
Outline
Iterative Dialogue System Development NlpFarm: A Development Environment
GSLT - Dialogue Systems 2 4 030128
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 2 5 030128
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 2 6 030128
Method Overview
DS design
DS module
DS theory DS requirements specification
Other modulesDS framework
Con
cept
ual d
esig
nF
ram
ewor
k cu
stom
isat
ion
GSLT - Dialogue Systems 2 7 030128
Development Space
Tools
Code patterns
Modularisatio
n
Interface
s
Knowledge
representatio
n
Frameworktemplates
Dialogue history
Atomic request handling
Sub-dialogue controlX
X
X
X X
X
X
X
X
X
X
X
X X
X
X
X
X
X
X
X
X X
X
X
X
X
DS FrameworkCustomisation
DS Design
DS Capabilities
GSLT - Dialogue Systems 2 8 030128
Applying the Iterative method Iteration 1: Q/A-system
Iteration 2: Dialogue history
Iteration 3: Sub-dialogue
Q/A:U: List actors in Star WarsS: [Marc Hamill, Harrison Ford, …]U: Who directed Star Wars?S: George Lucas
Dialogue history:U: Who is starring in the Bond movie?S: Sean ConneryU: And who directed it?S: Guy Hamilton
Sub-dialogue:U: Show all movies todayS: There are 30 shows that matches. Do you wish to see them all?U: Nah, only the ones after nine pmS: [TABLE]
GSLT - Dialogue Systems 2 9 030128
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, 2001.
Lars Degerstedt and Arne Jönsson. Iterative Implementation of Dialogue System Modules. Proceedings of Eurospeech 2001. Aalborg, Denmark, 2001.
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.
GSLT - Dialogue Systems 2 11 030128
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 codeRunning systems and demos
GSLT - Dialogue Systems 2 12 030128
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 2 14 030128
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 2 15 030128
Library example: nlpLib
Includes utilities such as:Unifiable Feature StructuresPhased Language Process (PLP) design
patternLibrary for text generation
The PLP pattern suits the iterative method
GSLT - Dialogue Systems 2 17 030128
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 2 18 030128
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 2 19 030128
Re-using libs and tools
Design a simple set of phases (PLP pattern in nlpLib library) for a Q/A (first iteration)
1. Parse Phase2. Database Access Phase3. 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 2 20 030128
Implementing a simple PLP
ParsePhase AccessPhase GenerationPhase
The 3 phases are ordered in a ”pure phase graph”
IN OUT
GSLT - Dialogue Systems 2 21 030128
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 2 22 030128
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 grammarif (!l.isEmpty()) { return (FeatureStructure) l.get(0); //FeatureStructure is part of nlpLib} else { return null;}
}
GSLT - Dialogue Systems 2 23 030128
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 2 24 030128
Using Quaks for DB Queries
BirdQ uses MySql queries TvGuide uses URL queries (Internet Movie
Database)
GSLT - Dialogue Systems 2 25 030128
tGen for Text Generation
BirdQ demo shows how to use opennlp.nlplib.tgen for text generation