(FILECREATED "27-Oct-84 16:53:59" {ERIS}<SPEECH>LEXICON>LOOKUP.;3 2193 changes to: (FNS GETPRONUN FIND.SUBSTRING) (VARS LOOKUPCOMS) previous date: "24-Oct-84 22:00:34" {ERIS}<SPEECH>LEXICON>LOOKUP.;1) (* Copyright (c) by NIL. All rights reserved.) (PRETTYCOMPRINT LOOKUPCOMS) (RPAQQ LOOKUPCOMS ((FNS FIND.SUBSTRING GETPRONUN))) (DEFINEQ (FIND.SUBSTRING [LAMBDA (ARRAY PHRASE OUTFILE) (* mmw: "27-Oct-84 16:00" finds not only the pronunciation of words such as "thistle", or "is", but also finds words that contain the specified spellings. Thus (QUOTE (this is)) will find the pronunciation of this, is, thistle, hubris etc........ Due to STRPOS anchor.) (PROG [(OUTSTREAM (OPENSTREAM OUTFILE (QUOTE OUTPUT] [for PATTERN in PHRASE do (for I SPELLING from 1 to (ARRAYSIZE ARRAY) do (SETQ SPELLING (CAR (ELT ARRAY I))) (SETQ PRONUNCIATION (CADR (ELT ARRAY I))) (if (STRPOS PATTERN SPELLING) then (PRIN1 PRONUNCIATION OUTSTREAM)) (if (EQ (IREMAINDER I 250) 0) then (PRIN1 (QUOTE clank) T] (TERPRI OUTSTREAM) finally (RETURN (CLOSEF OUTSTREAM]) (GETPRONUN [LAMBDA (ARRAY PHRASE OUTFILE) (* mmw: "27-Oct-84 16:50" flags on strpos insures against matching substrings) (PROG [(OUTSTREAM (OPENSTREAM OUTFILE (QUOTE OUTPUT] [for PATTERN in PHRASE do (for I SPELLING from 1 to (ARRAYSIZE ARRAY) do (SETQ SPELLING (CAR (ELT ARRAY I))) (SETQ PRONUNCIATION (CADR (ELT ARRAY I))) (if (STRPOS PATTERN SPELLING NIL NIL T NIL NIL T) then (PRIN1 PRONUNCIATION OUTSTREAM)) (if (EQ (IREMAINDER I 250) 0) then (PRIN1 (QUOTE chomp) T] (TERPRI OUTSTREAM) finally (RETURN (CLOSEF OUTSTREAM]) ) (DECLARE: DONTCOPY (FILEMAP (NIL (366 2171 (FIND.SUBSTRING 376 . 1351) (GETPRONUN 1353 . 2169))))) STOP