(FILECREATED " 7-Aug-84 17:54:43" {ERIS}<SPEECH>LEXICON>NLOAD.;1 2781   

      changes to:  (VARS NLOADCOMS)
		   (FNS FOOTIFY-LEXICON)

      previous date: " 2-Aug-84 19:44:03" {ERIS}<SPEECH>LEXICON>NLOAD.FPKG;1)


(PRETTYCOMPRINT NLOADCOMS)

(RPAQQ NLOADCOMS ((RECORDS LEXENTRY)
		  (FNS FOOTIFY-LEXICON MAKELEXREAD READLEXENTRY LOAD-LEXICON)))
[DECLARE: EVAL@COMPILE 

(RECORD LEXENTRY (ORTH PRON FREQ))
]
(DEFINEQ

(FOOTIFY-LEXICON
  [LAMBDA (INFILE OUTFILE)                                   (* edited: " 7-Aug-84 17:52")
    (PROG ((INSTREAM (OPENSTREAM INFILE (QUOTE INPUT)))
	   (OUTSTREAM (OPENSTREAM OUTFILE (QUOTE OUTPUT)))
	   (RDTBL (MAKELEXREAD))
	   [BITTBL (MAKEBITTABLE (QUOTE (32]
	   SIZE ENTRY)
          (PRINT (READ INSTREAM)
		 OUTSTREAM)
          (PRINT (PACK* (QUOTE FOOT)
			(READ INSTREAM))
		 OUTSTREAM)
          (PRINT (SETQ SIZE (READ INSTREAM))
		 OUTSTREAM)
          (for I from 1 to SIZE
	     do (SETQ ENTRY (READLEXENTRY INSTREAM BITTBL RDTBL))
		(PRIN1 (fetch (LEXENTRY ORTH) of ENTRY)
		       OUTSTREAM)
		(PRIN1 " " OUTSTREAM)
		(PRIN1 (PARSE-1-WORD ENTRY)
		       OUTSTREAM)
		(PRIN1 " " OUTSTREAM)
		(PRIN1 (fetch (LEXENTRY FREQ) of ENTRY)
		       OUTSTREAM)
		(TERPRI OUTSTREAM)
		(COND
		  ((EQUAL (IREMAINDER I 1000)
			  0)
		    (printout T I T)))
	     finally (CLOSEF INSTREAM)
		     (CLOSEF OUTSTREAM])

(MAKELEXREAD
  (LAMBDA NIL
    (PROG ((TBL (COPYREADTABLE)))
          (SETSEPR '(13)
		   NIL TBL)
          (RETURN TBL))))

(READLEXENTRY
  (LAMBDA (STREAM BITTBL RDTBL)                              (* "Gumby" " 2-Aug-84 17:59")
    (SKIPSEPRS STREAM)
    (PROG ((ENTRY (RSTRING STREAM RDTBL))
	   POS NPOS)
          (RETURN (create LEXENTRY
			  ORTH ← (SUBSTRING ENTRY 1 (SUB1 (SETQ POS (STRPOSL BITTBL ENTRY))))
			  PRON ← (SUBSTRING ENTRY (ADD1 POS)
					    (COND
					      ((SETQ NPOS (STRPOSL BITTBL ENTRY (ADD1 POS)))
						(SUB1 NPOS))
					      (T NPOS)))
			  FREQ ← (COND
			    (NPOS (MKATOM (SUBSTRING ENTRY (ADD1 NPOS))))
			    (T 0)))))))

(LOAD-LEXICON
  (LAMBDA (INFILE)
    (PROG ((INSTREAM (OPENSTREAM INFILE 'INPUT))
	   (RDTBL (MAKELEXREAD))
	   (BITTBL (MAKEBITTABLE '(32)))
	   LEXNAME FROB LEXICON)
          (READ INSTREAM)                                    (* Skip the comment *)
          (SETQ LEXNAME (READ INSTREAM))
          (SET LEXNAME (SETQ LEXICON (ARRAY (READ INSTREAM))))
          (FOR I FROM 1 TO (ARRAYSIZE LEXICON)
	     DO (SETA LEXICON I (READLEXENTRY INSTREAM BITTBL RDTBL))
		(IF (EQ (IREMAINDER I 1000)
			0)
		    THEN (PRINTOUT T I T))
	     FINALLY (CLOSEF INSTREAM)))))
)
(PUTPROPS NLOAD COPYRIGHT (NONE))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (423 2725 (FOOTIFY-LEXICON 433 . 1427) (MAKELEXREAD 1429 . 1558) (READLEXENTRY 1560 . 
2107) (LOAD-LEXICON 2109 . 2723)))))
STOP