[comp.ai] In layman's terms.

erhoogerbeet@watmath.UUCP (05/23/87)

Hello. I am an undergrad going into computer science, and have long been
interested in ai. But ai has always been "above" us lowly first and second
year students and we have been relegated to the quicksorts and recursive 
n factorial problems. I think this would be a good place to have articles
that introduced the laymen to ai to keep our interest.

Recently, we worked on a simple compiler for numerical expressions using
pwap on cms which is similar to yacc on unix. We entered a modified
Backus-Naur Form and it spewed forth source code in pascal for an expression
interpreter.

Also, I have played many an adventure game and have always
been intrigued by the way it parses and interprets commands given to it in
simple English. 

Is there a Backus-Naur Form for the English language itself or is this too
complicated? If not, how is it that we can understand a huge variety of 
different sentence forms and still recognize that some are syntactically
incorrect? Basically, what I am asking is it possible to do syntactic
checking as if "compiling" a sentence with rules set down in some BNF?

As I understand it so far, natural language processing would have at least
two levels (syntactic, semantic) and that syntactic checking level would
be the basis of the other. 

"I bed he not on." is not syntactically or semantically correct.
"Colourless green ideas sleep furiously." syntactically but not semantically
  correct.

To be semantically correct, a sentence must be syntactically correct.
Semantic checking would involve some connotation checking using trees and
associations, but there is probably no clear-cut way of doing this. 

So I ask about syntactic checking. 

Some compilers have a front-end/back-end structure. Could syntactic checking
be a front end part of the compiler? Theoretically, a syntax checker could
be given a certain BNF for a language and be plugged into a back end
semantic checker.

But there must be someone out there on the net who can set me straight and
do it in layman's terms.

From an interested undergrad:


------ ---------               ------------------------------------------
erhoogerbeet@watmath.uucp    "`The Guide says there is an art to flying,'   
ehoogerbeets@wateuler.uucp     said Ford,`or at least a knack. The knack lies
Edwin (Deepthot)               in learning how to throw yourself at the ground
Hoogerbeets                    and miss.' He smiled weakly." 

edusoft@ecf.UUCP (05/27/87)

In article <13263@watmath.UUCP> erhoogerbeet@watmath.UUCP (Edwin (Deepthot)) writes:
>Is there a Backus-Naur Form for the English language itself or is this too
>complicated? If not, how is it that we can understand a huge variety of 
>different sentence forms and still recognize that some are syntactically
>incorrect? Basically, what I am asking is it possible to do syntactic
>checking as if "compiling" a sentence with rules set down in some BNF?

The most easily locatable reference I know of for a phrase-structure
(you'll have to convert to BNF) grammar of English is:

Generalized Phrase Structure Grammar
Gerald Gazdar, Ewen Klein, Geoffrey Pullum and Ivan Sag
1985
Blackwell and Harvard University Press

Mind you, that'll be quite a task, as GPSG abstracts away from
atomic node labels and order in constituents.

You'd probably have to write a GPSG to BNF compiler.

>To be semantically correct, a sentence must be syntactically correct.

A lot of people would agree with this statement, but this does not
allow for partial interpretation of sentences.

It is also possible to interpret syntactically incorrect sentences, such as:

    Me went to the store.

>But there must be someone out there on the net who can set me straight and
>do it in layman's terms.

I have my doubts whether anything in linguistics can be explained in
layman's terms.

bill idsardi
computational linguist
educational software products
1263 bay st.
toronto, ontario
canada
M5R 2C1
922-0087
...utzoo!utai!utecfa!edusoft

mj@elmgate.UUCP (05/30/87)

	I recently finished an experimental graduate course in 
	Natural Language Processing at Purdue, where I am working on
	my MSEE.  It was offered for graduate credit jointly by
	the schools of Electrical Engineering and English, and co-taught
	by an EE and a linguistics professor.  Due to
	other time constraints, I did not complete the final project,
	but understood the material well enough to have done so if
	I'd not been so rushed.  The course used Terry Winograd's 
	LANGUAGE AS A COGNITIVE PROCESS: VOLUME I: SYNTAX, which 
	discusses context-free phrase-structure grammars, 
	active chart parsing, transformational grammars, and 
	describes recursive and augmented transition networks (RTN's 
	and ATN's) well enough that implementation is 
	really not too difficult.  One of the nice things about the ATN
	parser is that (for the language described by the ATN),  it can
	be written to produce a recursive data structure that describes
	all of the possible meanings of a sentence available to the ATN.
	This means that, with a carefully described grammar and for a
	particular subset of a language, syntactically unambiguous 
	sentences will produce a unique parse,  and ambiguous sentences
	("Time flies like an arrow") will produce multiple parses.
	Semantic analyzes specially designed for acting on the frames
	produced by the ATN parser can then choose an appropriate parse,
	ask for clarification, update knowledge bases, etc.  
	
	I can give a limited recommendation for Winograd's book: it is fairly
	understandable, but it was quite hard to find anyone who
	liked his algorithm notation.  Winograd introduces an algorithm
	description language called "DL", and I can't say I like it much.
	It does have the advantage of separating the topic from the
	technology, i.e., you don't have to know any particular programming
	language to understand the algorithms.  Ain't my cup 'o' tea, tho'.

	One of the posters mentioned "waiting FOREVER for Volume II"
	of Winograd's book to come out.  Don't hold your breath.  I
	think I'll get the final volume (9 is it?) of THE ART
	OF COMPUTER PROGRAMMING before I buy Winograd Vol II.  I could be
	wrong, though, and would love to see Vol II in print.

-------------------------------------------------------------------------------
Mark A Johnson - Eastman Kodak Co. - Dept 646 - KEEPS - Rochester, NY 14650
The opinions expressed above are not necessarily those of Eastman Kodak Company
and are entirely my responsibility.

edwards@uwmacc.UUCP (mark edwards) (06/01/87)

In article <639@elmgate.UUCP> mj@elmgate.UUCP (Mark A. Johnson) writes:
:
:	One of the nice things about the ATN
:	parser is that (for the language described by the ATN),  it can
:	be written to produce a recursive data structure that describes
:	all of the possible meanings of a sentence available to the ATN.
:	This means that, with a carefully described grammar and for a
:	particular subset of a language, syntactically unambiguous 
:	sentences will produce a unique parse,  and ambiguous sentences
:	("Time flies like an arrow") will produce multiple parses.
:	Semantic analyzes specially designed for acting on the frames
:	produced by the ATN parser can then choose an appropriate parse,
:	ask for clarification, update knowledge bases, etc.  

   An ATN must be intuitively pleasing for an MSEE. And for a simple 
   sentence like "Time flies like an arrow", it is easy enough for
   the parser to parse. There are not many permutation for a string
   of five words. (Of course for langauges like japanese with a lot
   of homonyms, it could be much harder).  As sentences get longer,
   and gapping and deletion start to happen, the inappropriateness
   of recursive structures bog down the processing.

   mark
-- 
    edwards@unix.macc.wisc.edu
    {allegra, ihnp4, seismo}!uwvax!uwmacc!edwards
    UW-Madison, 1210 West Dayton St., Madison WI 53706

jcz@sas.UUCP (John Carl Zeigler) (06/01/87)

It is not be necessary, nor sumptimes suffic'nt, foah an Englizt
sentence to simptatically correct in oder to habe semantic content.
A'int Broca's area wunnerful?   

-- 
--jcz
John Carl Zeigler
SAS Institute Inc.
Cary, NC  27511           (919) 467-8000        ...!mcnc!rti-sel!sas!jcz

erhoogerbeet@watmath.UUCP (06/03/87)

In article <242@sas.UUCP> jcz@sas.UUCP (John Carl Zeigler) writes:
>It is not be necessary, nor sumptimes suffic'nt, foah an Englizt
>sentence to simptatically correct in oder to habe semantic content.
>A'int Broca's area wunnerful?   
>--jcz
>John Carl Zeigler
>SAS Institute Inc.
>Cary, NC  27511           (919) 467-8000        ...!mcnc!rti-sel!sas!jcz

The human brain converts this into sounds or even recognizes the general
shape of *known* words and infers the meaning. But given something
syntactically correct, wouldn't that make life easier?

Edwin (Deepthot)
Hoogerbeets

gilbert@aimmi.UUCP (06/10/87)

In article <242@sas.UUCP> jcz@sas.UUCP (John Carl Zeigler) writes:
>It is not be necessary, nor sumptimes suffic'nt, foah an Englizt
>sentence to simptatically correct in oder to habe semantic content.
>A'int Broca's area wunnerful?   

Zo wab? Ayn wi orl juz gezzin duh worvesunthen parsinapropa?
Juzlux lijk leghziegheil suds tea tchu shone 2 mi. Sin tackssisall
dill sehr wansyer dun gezzin.

Ask eecummings.

P.S. flames on leghziegheil to /dev/null please :-)
-- 
   Gilbert Cockton, Scottish HCI Centre, Ben Line Building, Edinburgh, EH1 1TN
   JANET:  gilbert@uk.ac.hw.aimmi    ARPA:   gilbert%aimmi.hw.ac.uk@cs.ucl.ac.uk
		UUCP:	..!{backbone}!aimmi.hw.ac.uk!gilbert