(FILECREATED " 6-Sep-84 22:09:29" {ERIS}<SPEECH>LEXICON>MODIFY-LFG.;7        

      changes to:  (FNS MODIFY.LFG)
		   (VARS MODIFY-LFGCOMS)

      previous date: "13-Aug-84 15:59:07" {ERIS}<SPEECH>LEXICON>MODIFY-LFG.;6)


(* Copyright (c) 1984 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT MODIFY-LFGCOMS)

(RPAQQ MODIFY-LFGCOMS ((FNS MODIFY.LFG)
		       (* LFG-system functions which have been modified to parse strings of 
			  transcribed speech)
		       (FNS PPLEX PPWORDS READWORDS PARSE MORPHEMES MORPHANAL DSHOWPARSES TREEPRINT)
		       (P (MODIFY.LFG)
			  (/ DI2s))))
(DEFINEQ

(MODIFY.LFG
  [LAMBDA NIL                                                (* mmw: " 6-Sep-84 22:06")
                                                             (* Modifies the LFG system to parse words and feet)
    [COND
      ((GETD (QUOTE CD))                                     (* Making sure we connect to the correct directory, and 
							     using PKs version of CNDIR if it is there)
	(CD (QUOTE {ERIS}<SPEECH>LEXICON>)))
      (T (CNDIR (QUOTE {ERIS}<SPEECH>LEXICON]
    (LOAD? (QUOTE PARSE-LEX.DCOM))
    (CLOSEW FSTRUCTUREFILE)
    (LOAD? (QUOTE PHONES))
    (LOAD? (QUOTE FOOT-GRAMMAR))                             (* Fix up the screen)
    (WINDOWPROP TREEFILE (QUOTE TITLE)
		"Foot-structure Window")
    (CLOSEW LFGLOGOW])
)



(* LFG-system functions which have been modified to parse strings of transcribed speech)

(DEFINEQ

(PPLEX
  [DLAMBDA ((WORDS (ONEOF LITATOM NUMBERP LISTP (LISTP OF LITATOM)))
            (LANGUAGE LITATOM)
            (FILE))
                                                             (* mmw: " 6-Sep-84 22:04")
    (COND
      ((NULL LANGUAGE)
	(SETQ LANGUAGE CURRENTLANGUAGE)))
    (AND (WINDOWP FILE)
	 (DSPRESET FILE))
    (RESETFORM (OUTPUT FILE)
	       (for M in (for W inside WORDS join (MORPHEMES W LANGUAGE))
		  do (printout NIL T .P2 M)
		     (PPENTRY (GETLEX LANGUAGE M)
			      FILE)))])

(PPWORDS
  [DLAMBDA ((LEXNAME [ONEOF NUMBERP LITATOM LISTP (LISTP OF LITATOM)
			    (LISTP (WHOSE (CAR (LISTP OF LITATOM))
					  (CDR NIL])
            (FILE))
                                                             (* mmw: " 6-Sep-84 22:02")
    [COND
      ((NLISTP LEXNAME)
	(SETQ LEXNAME (LIST CURRENTLANGUAGE LEXNAME)))
      ((LISTP (CAR LEXNAME))
	(SETQ LEXNAME (CAR LEXNAME]
    (RESETLST [COND
		((OPENP FILE (QUOTE OUTPUT))
		  (RESETSAVE (OUTPUT FILE)))
		(T (RESETSAVE (OUTFILE FILE)
			      (QUOTE (PROGN (CLOSEF? (OUTPUT OLDVALUE]
	      (AND (WINDOWP FILE)
		   (DSPRESET FILE))
	      (for W (L ←(CAR LEXNAME)) in (CDR LEXNAME)
		 first (printout NIL T .FONT BIGFONT .P2 L T T .FONT DEFAULTFONT)
		 do (PRIN2 W)
		    (PPENTRY (GETLEX L W)
			     FILE)
		    (TERPRI))
	      (printout NIL "----" T)
	      (OUTPUT))])

(READWORDS
  [LAMBDA (FILE)                                             (* mmw: " 6-Sep-84 21:59")
    (RESETLST [COND
		((OPENP FILE (QUOTE INPUT))
		  (RESETSAVE (INPUT FILE)))
		(T (RESETSAVE (INFILE FILE)
			      (QUOTE (PROGN (CLOSEF? (INPUT OLDVALUE]
	      (COND
		((EQ (SKIPSEPRS NIL FILERDTBL)
		     (QUOTE %())                             (* Skip the paren inserted on files to avoid