Upgrade to CorpusSearch 2

CorpusSearch 2 is an open source program written in Java. It is available for free download from Sourceforge. CorpusSearch 2 is under development and new versions come out frequently. Download the latest version available from the list of releases.
  1. Download the current version of the CS_2.jar file from sourceforge (http://corpussearch.sourceforge.net).
  2. Put the file in a convenient place, for example the Applications folder under Mac OS X or the Program Files folder under Windows.
  3. Open a window that allows you to run commands - the Terminal program under Mac OS X, an xterm window under Unix or Linux. Windows users see below.
  4. Assuming that you have put CS.jar into the folder FOO, the following line will start CorpusSearch in any flavor of Unix that has Java installed (including Mac OS X):
    prompt> java -classpath /FOO/CS.jar csearch/CorpusSearch
    
    
    Note that we are assuming Unix path syntax and that FOO is a top-level directory. The classpath must give the full path, using appropriate syntax.

Windows users

Put the CS.jar file (the file will actually have a name something like CS_2-002.18.jar) into the Program Files folder.
  1. Launch the command prompt via Start | Run and type cmd.exe in the box (command under Windows 98).
  2. You should get the following prompt: "C:\"
  3. Type the following line at the prompt (where CS_version.jar stands for stands for whichever version of CS you have downloaded, e.g., CS_2-002.18.jar).
    java -classpath C:\Program Files\CS_version.jar csearch/CorpusSearch
    
    Note the change in direction of the slashes. This is not a typo!

This command will launch a dialogue that will prompt you for a query file, source files, and output file. After the program has terminated, use the up-arrow key to return to the previous command line and restart (This means you only have to type the above line once).

Alternatively you can include the query and source file(s) on the command line:

java -classpath C:\Program Files\CS_version.jar csearch/CorpusSearch query.q source.psd

In this format the output file will automatically be given the same name as the query file with the extension .out (i.e., in the example query.out).

You can save some typing by putting the 'classpath' in an autoexec.bat file, as follows:

  1. open a file in notepad (or other ascii editor, such as 'edit'). It is important that the file is plain text and has no hidden characters.
  2. type the following line into the file
    set CLASSPATH=C:\Program Files\CS_version.jar
    
    where, as above, CS_version.jar stands for whichever version of CS2 you have downloaded, e.g., CS_2-002.18.jar. If you've put the CS_version.jar file in some directory other than C:\Program Files, replace this with the correct directory name.

    If you're planning to upgrade frequently and don't want to be constantly editing the autoexec.bat file, you can instead use a standard filename in the autoexec.bat file (such as CS.jar) and each time you get a new version of CS2, simply copy (or rename) it to CS.jar, thereby making CS.jar the current version.

  3. save the file in the C: directory with the name autoexec.bat.
  4. restart your machine

    This works with Windows 2000 Professional; unfortunately different versions of Windows differ somewhat, and it may not work, exactly as advertized, with all recent versions.

Now you can launch the CS2 interactive dialogue by simply typing:
java csearch/CorpusSearch
or for command line control
java csearch/CorpusSearch query.q source.psd

If you are using Windows, we recommend downloading a copy of the Java Virtual Machine (
Java Runtime Environment) from Sun, version 1.4 or later (http://java.com/en/) rather than running Microsoft's Java. To check which virtual machine you are running under Windows, in the command window, type:
java -version
If you have been using CorpusSearch 1.1, you should already have the Sun Java Runtime Environment.