LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 11 Jun 2004 17:27:58 -0400
Reply-To:     sashole@bellsouth.net
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Paul M. Dorfman" <sashole@BELLSOUTH.NET>
Organization: Sashole of Florida
Subject:      Re: Need to generate random words/letter configurations in SAS
Comments: To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
In-Reply-To:  <2iu9apFqnuukU1@uni-berlin.de>
Content-Type: text/plain; charset="us-ascii"

Richard,

Why look for the dictionary if PROC SPELL can look it up for you :-) ?

filename temp temp ;

data _null_ ; input word: $12. @@ ; list ; file temp ; put word ; cards ; let's see if sas spell procdure can bee used to verify whether tha seperate words in this, uhm, flie are, uhm, valid against a stantard internal dictionary ; run ;

option nodate nonumber nocenter ; title ;

proc spell in = temp verify ; run ;

In the OUTPUT window, this program generates (the dashes added)

File: "TEMP"

Unrecognized word Freq Line(s) ------------------------------------------------

sas 1 4 procdure 1 6 tha 1 13 seperate 1 14 uhm 2 18, 21 flie 1 19 stantard 1 25 -----------------------------------------------

Actually, the proc is even smarter than that; for example, adding the SUGGEST option to the VERIFY option resuts in

Unrecognized word Freq Line(s) ------------------------------------------------

sas 1 4 Suggestions: ass, as, gas, has, pas, was, sad, sag, sap, sat, saw, say, seas, spas, sags, saps, saws, says, sash

procdure 1 6 Suggestions: procure, procedure

tha 1 13 Suggestions: tea, the, thy, thai, than, that, thaw

seperate 1 14 Suggestions: separate

uhm 2 18, 21 Suggestions: hum, ohm

flie 1 19 Suggestions: file, lie, fie, flee, flip, flit, flied, flier, flies

stantard 1 25 Suggestions: standard ------------------------------------------------

Better still, you can add, specify, create, and populate your own dictionaries or add your own entries or update the master dictionary. PROC SPELL does not produce an output data set, but it is not difficult to reroute the output and parse it. The proc is amptly documented in SAS Procedures Guide, version 6, Third Edition.

Kind regards, ------------------ Paul M. Dorfman Jacksonville, FL ------------------

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Richard A. DeVenezia > Sent: Friday, June 11, 2004 1:44 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Need to generate random words/letter > configurations in SAS > > Ira Roberts wrote: > > Hello Richard and All, > > > > out of sheer curiosity, does anyone has a dictionary of English > > language available so that it can be used in SAS to check > how many of > > these 5000 words are not gibberish? I remember one old article that > > Did you know SAS comes with a Spell checker ? > > Open a NOTEPAD window (enter NOTEPAD in the command window) > > In command window > KEYS > program Ctrl-H to be SPELL NEXT > close back to notepad > Type: > This is a test of the SAS spell checker. > Press ctrl-home, ctrl-h to find that > [ "SAS" is unrecognized ] > > Talk about a humble spell checker! > > I don't know where the dictionary lives. > In windows I searched for *dict* files and found nothing > interesting. A search for *dct* found something, not word > dictionary, but dictionary nonetheless. > > dct* found "vdctnry.sas7bvew", which is the OS file of a SAS view. > > 32 Proc sql; > 33 describe view sashelp.vdctnry; > NOTE: SQL view SASHELP.VDCTNRY is defined as: > select * > from DICTIONARY.DICTIONARIES; > > > Dictionary entries might live in a sashelp catalog entry. > Added entries, if they go into a sas catalog, would probably > go into sasuser.profile. > > -- > Richard A. DeVenezia > http://www.devenezia.com/downloads/sas/samples >


Back to: Top of message | Previous page | Main SAS-L page