Using IBM’s Word Cloud Generator on Windows

The following is just a revisioning of John Laudun’s Digital Humanities Blog post, Using IBM’s Word Cloud Generator, for where his instructions would differ for Windows users (basic, but useful information for command prompt initiates:

And so, perhaps, the first place to begin is finding out how to get to the command line in Windows (XP, Vista, 7):

click on the Start Button, All Programs, Accessories, Command Prompt:

Command Prompt from the Startmenu

(or from the Run box, type in cmd and press enter). This will display the command prompt window:

It should take you to your user folder that corresponds to your login ID (this is slightly different in Windows XP). The Windows world uses the backslash key to describe its folder structure.

So the following path C:\Users\Big John can be read as follows:

  • C: is the drive (in this case, the “C drive”)
  • The \ (backslash) separates different levels of folders and files, in this case,  \Users is the Users subfolder
  • followed by  \Big John, the “Big John” subdirectory (folder)
  • The folder names are not case sensitive (at least when navigating) (so “big john” is read the same as “Big John”)

Okay, now you have the Command Prompt window open.

The > is known as the prompt, which is short for “the command line prompt.”

Your prompt is ready to receive instructions. (There’s a lot more to say about the environment in which you now find yourself, but for the sake of getting on with this tutorial we will leave that for another time.)

If you were to paste the code that you copied out of the .bat file we discussed in class and try to run it from where you are, chances are you will get nothing. That is because the prompt can only run things when it knows where they are — much the same applies in the GUI, but Windows and Mac and Linux GUIs do a lot of work behind the scenes to find applications for you. You have two choices: add the file hierarchy to your command (the %PATH% variable) or to navigate to where the WCG application is and run it from within its directory. (If you were going to use the application a lot, there are some other considerations, but we will leave those for another time — but feel free to ask if you like.)

So to navigate within the Command Prompt, you can use the following commands

  • your current (working) directory is automatically shown in the command box to the left of the cursor
  • type dir to display the contents of the current working directory (this won’t show you hidden folders or files; to see those, type in dir /a:h (show me files w a
  • type cd to change the directory you are in
  • type cd .. (that’s cd followed by a space followed by two periods) to move “up” a directory
  • to see a list of most of the commands available from the command prompt, you can type help , or for help with a particular command, such as dir, you could enter after the > help dir

To Navigate to the IBM Word Cloud directory, we are going to pretend it is on your Desktop:

C:\Users\Big John> cd desktop\IBM Word Cloud

This means, change directory (cd) to subfolder called desktop, and within that one, go to another subfolder called IBM Word Cloud. You can always change one directory at a time and do a dir to see what folders are in there in case you don’t remember:

C:\Users\Big John> cd desktop

C:\Users\Big John\Desktop> cd IBM Word Cloud

Typically, most Terminal windows will start you in your user home directory. My best advice for the sake of this current activity is to use Windows Explorer or the Mac Finder and move the unzipped folder containing the WCG, which is named “IBM Word Cloud” in my case, to the Desktop or to your Documents folder. Some place easy to get to.

From here, you should be able to run the bat file for testing:

But if you want to paste in the script from within the bat file (right click from Explorer and open with your favorite text editor), then copy the text of the script as you normally would. To paste the text inside the Command Prompt window, click on the  upper left corner on the c:\ icon:

Click on Edit within the dropdown menu, then click Paste:

Keep watching the Digital Humanities Seminar blog for more information

Categories: Education, Technology

Comments (1)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: