- First steps:
- Download the latest version of "CS.jar" from this site.
- Put the file in a convenient place; for example, the "Applications"
folder under Mac OS X or the "Program Files" folder under Windows.
- If you are using Windows, we recommend downloading a copy of the Java
Virtual Machine from Sun (version 1.4 or later) rather than running
Microsoft's Java. Here's how to check which virtual machine you are running under
The web address of the Sun java site is:
- Search for the Command Prompt by clicking on the "Run" icon on the Start menu.
- Type "cmd" into the dialog box that comes up.
- Type "C:\Documents and Settings\username>java -version" in the Command Prompt
dialog box that comes up.
- Unix/Linux users (including Mac OS X):
We assume that you have put "CS.jar" into the top-level directory (folder) "FOO".
- Open a window that allows you run commands - the Terminal program under
Mac OS X, an xterm window under Unix or Linux. Adjust the path in the example to
fit the location you are using for the program.
- Type the following line (minus the prompt "%") at the prompt in the
% java -classpath /FOO/CS.jar csearch/CorpusSearch
The classpath must give the full path to the jar file, using appropriate
- Once you are sure that the program runs, you can put an alias to the above command into your shell initialization file
(usually, .cshrc for the tshell or .bashrc for the bash shell). For example, the following line will create such an alias in
a .cshrc file:
alias CS 'java -classpath /FOO/CS.jar csearch/CorpusSearch'
- Windows users:
We assume that you have put "CS.jar" into the "Program Files" folder.
- Launch the Command Prompt via Start -> Run and type "cmd" in the box
("command" under Windows 98).
- Type in the following command (without the quotes) into the Command Prompt
dialog box: "cd C:\>"
- Type the following line (without the prompt itself) at the resulting prompt:
C:\> java -classpath "C:\Program Files\CS.jar" csearch/CorpusSearch
Note that the direction of the slashes is different in the two arguments after
"-classpath". Also note the quotation marks around the directory path.
CorpusSearch runs when invoked in a terminal window or cmd box as indicated above. If it is invoked without arguments, it will prompt the user
to give a command file name and a source file name. These files can also be specified as arguments of the program on the command line. For example,
if the command file is "foo.q" and the source (data) file is "bar.psd," then the following command will execute a search:
%CS foo.q bar.psd
The results of the search will be placed in a file called "foo.out." The name can be changed by adding a third argument on the command line,
prefaced by "-o," as in:
%CS foo.q bar.psd -o goo.out
We are assuming here that "CS" has been defined as an alias for CorpusSearch as indicated above.
For details on what command files and source files may and must contain and what result files look like, see the body of this manual.