LESK: A LANGUAGE SYNT~TIZING NATURAL LANGUAGE, COMPUTER 
LANGUAGE AND LOGIC 
Douglas Skuce 
Dept. of Computer Science, University of Ottawa, Ottawa, 
Ontario, Canada 
Introduction 
LESK (Language for Exactly 3tatl~ Knowledge) is intend- 
ed to bridge the considerable gap between natural language 
(I~L), computer lan6uage (CL) and log~tc. It is desirable to do 
so for the following reason. To implement any non-trivial 
computer system for some problem domain, one must first have 
a very clear understanding of the domain concepts. Usually the 
implementors do not have this knowledge, and must struggle to 
obtain it from the domain experts, who are usually not comput- 
er experts. Hence a means of precise and efficient knowledge 
expression would be very useful. No such tool exists today 
and we therefore seek to develop one. LESK is a first approx- 
imation to such a medium for knowledge capture. 
Anyone who has participated in the design of any system 
where knowledge transfer from experts was involved will appre -~ 
clare the need for such a tool. The existlng tools are the 
following: ~L, mathematical concepts and notation, computer 
concepts and notation, plus assorted devices llke dls4~ams, 
plctures, models, etc. By far the major tool is NL however, 
which is unfortunately very poorly used by most paople, part- 
icularly recent university @~aduates. The most frequent ezTors 
include the use of undefined termlnolo@~, synonyms or homon~ns 
(whose status as such must be guessed), unclear syntax, logical 
- 262 - 
errors (such as outright contradictions), undefined relations 
between concepts, and s£mp~e lack of good organization° LESK 
forces the user to express him/herself izi ways designed to 
minimize such errors. A T RSK system (an interactive program 
wh£ch "understands" LESK) would further reduce such errorso 
Criteria for LESK 
LESK should 
a) be readable by most university graduates in science, 
medicine, law or business, for ezmnple| 
b) be writable by most people with a basic knowledge of set 
theory, logic end computers'; 
o) have a simple semantics expressible in first-order logic~ 
d) be lmplementable using artificial intelligence techniques! 
e) be sufficiently general to be usable in the subjects of 
interest to those listed in a). 
The present design of LESK has been shown to meet all of 
these criteria. 
~asi~n of ~sK 
LESK should be viewed as a language for making assert- 
ions about sets, tuples, sequences, functions, relations, 
procedures and other s~nple mathematical concepts using an 
Enslish-like syntax (many other NLs could be used! translat- 
ion of LESK-based knowledge should be easier than translation 
of NL). The user declares words or phrases either explicitly 
or ~nplioitly to be nouns (or noun-like), adjectives, pre- 
positions, or verbs (other categories have not been necess- 
ary). Nouns and noun phrases denote sets, stative verbs de- 
note relations, action verbs denote procedures, and preposit- 
ions denote case relations. The syntax is a compromise bet- 
ween b-L, CT, and logo. All constructs have a simple f~rst- 
-order logic interpretation. 
An example (whose spirit should warm the heart of those 
who despair of ever understanding the regulations of their 
- 263 - 
institution) follows. LESK primitives are in lower case. We 
first illustrate ~oun deo!arations. (N.B. In the final paper, 
this example will be greatly expanded and explained.) 
every PERSON: 
- has I NAME 
- has I integer called their AGE 
- has I ADDRESS 
end, 
every STUDENT: 
kinds: IK;LL-TIHE -, PART-TIME - | 
kinds: UNDERGRADUATE -, GRADUATE--! 
- is a PERSON! 
- is ENROLTR~ IN I DEGREE PROGRAM! 
- is a STUDENT IN 1 FACULTY, SCHOOL or DEPARTMeNt! 
- has 1 ACADEMIC RECORD 
end. 
every ACADEMIC RECORD of a STUDENT X: 
- has 1 FACULTY, SCHOOL or DE~T! 
- has 0 or more COURSE CREDITS! 
- has 0 or more COURSE SECTIONS called the COURSES-BEING- 
TAKEN BY X 
end • 
every COURSE CREDIT: 
- is a pair~X, Y~ where X is a COURSE, 
Y is a LETTER GRADE 
end, 
We illustrate next two stative verb declarations: 
a STUDENT X is ENROLLED IN a COURSE SECTION Y iff- 
X is on the ENROLLMENT LIST of Y. 
a STUDENT X is a STUDENT IN a FACULTY, SCHOOL or DEPARTMENT Y 
if f: 
- 264 - 
¥ - the FACULTY, SCHOOL or DEPARTMENT of the ACADEMIC 
RECORD of X. 
Finally, we illustrate an action verb declaration: 
To ENROLL a STUDENT X IN a COURSE SECTION Ys 
preconds for each PREREQUISITE Z of Y there is a COURSE 
CREDIT ~Z,M> on the ACADEMIC RECORD of X such 
that M is a PASSING GRADE~ 
X has PAID the FEE of Y| 
adds 
negate s 
delete: 
procedure: add X to the ENROLLMENT LIST of Y! 
add Y to the COURSESBEINGTAKEN BY X 
end. 
Conc~udin~ Remarks 
LESK has been used to describe neurophysiological know- 
ledge, electrical circuits, PASCAL, the Canadian census data- 
base, and university regulations. A partial implementation 
has been developed in DEC 10 PROLOG. A LESK system should be 
capable of answering any question (expressed in LESK) which a 
person could answer from the same LESK knowledge base. This 
clearly requires both deductive and database komponents. 
Systems now exist which combine these two! it remains there- 
fore to add the LESK component, which is our eventual goal. 
- 265 - 
