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 (July 2003, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 29 Jul 2003 13:54:00 -0400
Reply-To:     Nathaniel_Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nathaniel Wooding <Nathaniel_Wooding@DOM.COM>
Subject:      Re: any good techniques to check spelling in SAS report??
Comments: To: ruifeng <ruifeng@SCHOOLPH.UMASS.EDU>
Content-type: text/plain; charset=us-ascii

Ruifeng

There is a way to check for spelling but I will leave it up to you as to how good it is.

SAS has a Procedure called, surprise, Proc Spell. The story that I was told is that when SAS bought the Lattice Corporation prior to rewriting the package in C for V6, this particular spell checker was something that they picked up. I just checked the v8 online documents but do not see it in the section on procedures although it is still part of V8.

To use the proc, have your report output written to a text file. Then invoke Proc Spell. If you wish, you may create your own dictionary in order to define words that are not in SAS' dictionary. This dictionary is a SAS catalog entry and and is created with Proc Spell. I have one application that uses this and, since I wrote this years ago, I am very rusty on the syntax. Here is what I found in my archives:

to create a dictionary

1) create a text file with the words that you want to define. Put each word on a separate line; 2) run a SAS job with a libref pointing to the SAS file which will hold the dictionary catalog plus a fileref pointing to you word list. eg

libname spell 'C:\sas\spelling.sas'; filename words 'C:\sas\wordlist.txt';

Proc spell wordlist=words dictionary=spell.spell.mywords create; * if you are adding more words at a later date, change create update;

my old mainframe job has an additional parameter, size=4096, for the creation run but I don't know if it is needed in other operating systems.

To use Proc spell

filename test 'your txt file'; libname words 'c:\sas\spelling.sas'; proc spell in=test dictionary=words.spell.mywords verify suggest;

I have run only a very simple pc test that did not use a private dictionary so you may have to tweak the code above a bit. I suspect that you may need to create your own dictionary since it does have a lot of words but there are some, such as SAS, which do not appear.

Since you are writing this to a text file, you could just as well call it up with a text editor and run the internal spell check. However, with Proc Spell, you could integrate the spell checking into the job stream.

Good luck

Nat Wooding

ruifeng <ruifeng@SCHOOLPH To: SAS-L@LISTSERV.UGA.EDU .UMASS.EDU> cc: Sent by: "SAS(r) Subject: any good techniques to check spelling in SAS report?? Discussion" <SAS-L@LISTSERV.U GA.EDU>

07/29/03 11:47 AM Please respond to ruifeng

Is there any way that we can plug in some certain SAS procedure into a PROC REPORT procedure, so that it can automatically check if there is any spelling or grammar errors in the output report?? I guess there should be some way out...


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