Organization of the Source Code in the

ugliestharrasΛογισμικό & κατασκευή λογ/κού

4 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

71 εμφανίσεις

Organization of the Source Code in the

Ariadne Spoken Dialogue System



1 Organization

The source code is organized in three large sections. These sections are called base,
ariadne and ext, respectively, and correspond to the folders with the same name in

the
root of your <ariadne dir>. Each section of the source code contains several projects.
Each project is either a dynamic link library or an executable program.


The dlls in the base section are responsible for basic tasks such as wrapping system
depen
dent OS calls in generic classes, providing generic string handing routines and so
on. The dlls in the ariadne section implement natural language processing and dialogue
processing algorithms. The dlls in the ext section provide extensions to the dialogue

system such as data base access procedures or service requests.


The source code in each section is divided between the actual source code and APIs.


2 Projects

2.1 base section

The following dlls are in the base section.


s
ys.dll:

wraps system dependent

OS calls


b
lx.dll:

stands for ‘Software building blocks’ and provides reference counted
pointers, reference counted object interface and enumerators, classes for
dynamic typing at runtime and dynamic loading of dlls at runtime.


srv
.dll

stands for databas
e and provides abstractions over database access and
service requests.


util.dll

provides generic utilities that are often needed and don’t have a place to
call their own.


2.2 Ariadne section

The following dlls are member of the ariadne section.


Cfg.dll


provides classes for context free parsing based on the soup parser, and a

grammar compiler to translate vectorized cfg’s to soup cfg’s.

Dlg.dll


contains all the dialogue processing components (breakdown see below).

Lgx.dll


(‘logics’) contains the code
for typed feature logics and is used by dlg.

Spi.dll


(speech interface) interfaces to speech recognizers and tts.


The following executables are members of the ariadne section.


Ariadne.exe

the dialogue system.



Breakdown of the dlg.dll


The dialogue sys
tem is organized in four layers (from botton to top: layer0 to layer3).

Layer0 implements resource management. Layer1 offers turn oriented nlp services. Layer
(nonexistent as of yet) offers dialogue oriented nlp services. Layer3 controls the whole
system b
y means of a scripting language. This organization is reflected in the structure of
the source code. This breaks down as follows.


L0

implementation of layer0

L0ds

data source related classes

L0srv

service request related classes


L1

implementation of la
yer1

L1ads

abstract dialogue state management

L1dlg

dialogue class; contains discourse and ads

L1ds

data source related classes as needed on layer1

L1int

‘intention’ dialogue goal related classes

L1nlg

natural language generation related classes, expect ma
jor changes here

L1repr

representations


L2

will change


L3

bindings to the scripting language. The files in this directory are a good point to
start exploring the source code. Set break points at the first line of the glue functions, e.g.:


static JSBool

matches(JSContext *cx,JSObject *obj,uintN argc, jsval *argv, jsval *rval);


and single step through the code.

Mgr

dialogue manager classes, expect changes here

Desc

description of the dialogue manager, constructed during parsing of the .dlm files
and used

to construct the dialogue manager.