BookmarkSubscribeRSS Feed
Joannrap
Calcite | Level 5

I am looking to create an English dictionary data set using SAS Filter Node in SAS miner. I was given the following instructions:

 

Let’s first download the English U.S. dictionary file. Visit the “U.S. English Spell Checking Dictionary” site and download the open office dictionary file. Save the file to the local machine and unzip the folder. Now, we will upload the dictionary to our “SAS studio folder” in this case we are using SAS Studio as our directory. Let us now select SAS Studio from the SAS OnDemand for Academics page and log in to SAS Studio. Once we upload the dictionary, copy the location of the folder where the dictionary is saved.

Let us now login to the SAS Enterprise Miner, select view, and open the “Program Editor.” Enter the code

libname tmlib “<filelocation>”;
run;
data tmlib.engdict(keep=term pos);
length inputterm term $32;
infile '<fileLocation>/en_US.dic' truncover;
input linetxt $80;
i=1;
do until (inputterm = ' ');
inputterm = scan(linetxt, i, ' ');
if inputterm ne ' ' then do;
location=index(inputterm,'/');
if location gt 0 then term = substr(inputterm,1,location-1);
if location eq 0 then term = inputterm;
if lowcase(term) ne term then pos = 'Prop';
term = lowcase(term);
output;
end;
i=i+1;
end;
run;
 
 
I did as I was told, 
Joannrap_1-1627081870424.png

 

 
Joannrap_0-1627081798370.png

I then should see the dictionary in the SAS 

Joannrap_2-1627081997029.png

I am not seeing the library, what I am going wrong? 

 

1 REPLY 1
jimbarbour
Meteorite | Level 14

So, when you execute the code, what happens?  I assume a log must be produced somewhere.  In particular, I want to see what is in the log for this command:

jimbarbour_0-1627176747674.png

I haven't worked on Unix/Linux for a while, but memory suggests that you need a . in front of home.  I may be mis-remembering, but it's worth trying -- after we take a look at the log.  

 

Jim

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 981 views
  • 0 likes
  • 2 in conversation