Introducing Speech and Language Processing

1. Disclaimer of Warranty

Neither Cambridge University Press nor John Coleman make any warranties, express or implied, that the programs contained in the book and on this CD-ROM are free of error, or are consistent with any particular standard of merchantability, or that they will meet your requirements for any particular application. They should not be relied on for solving a problem whose incorrect solution could result in injury to a person or loss of property. If you do use the programs in such a manner, it is at your own risk. The authors and publisher disclaim all liability for direct or consequential damages resulting from your use of the program.

2. Contents of the CD-ROM

This CD-ROM contains, in the "Software" folder, all the programs that are presented and explained in the book, and a number of others developed by third parties, under the license terms stated below and on the separate license documents included on the CD-ROM.

(1) Programs and data files developed for use on the course:

Programs: autocorr_f0.c, cepstral_f0.c, cepstrum.c, coswave.c, filter.c, lpc_spectrum.c, lpcana.c, lpcsyn.c, meansof4.c, meansof40.c, multiply.c, nfsa1.pl, nfst1.pl, normalize.c, riy.par, rms.c, sentence_grammar.pl, slputils.c, spectrum.c, syllabifications.pl, syllable_grammar.pl, to_frames.c, voicing.c.

Sound files: cosine.wav, joe.dat, joe.wav, joe10k.dat, joe8k.dat, hissy.dat.

(2) Programs provided by permission of Numerical Recipes:

nrutil.c, nrutil.h

The above have been placed in the public domain by Numerical Recipes.

correl.c, four1.c, memcof.c

The routines in the above files are from the book Numerical Recipes in  C. (Cambridge University Press), Copyright © 1987-1992 by Numerical Recipes Software.  Used by permission.  Use of these routines other than as an integral part of the collection of software on this CD-ROM requires an additional license from Numerical Recipes Software (www.nr.com).  Further distribution in any form is prohibited.

(3) A simplified version of the Klatt synthesiser, based on an implementation original written by Jon Iles and Nick Ing-Simmons, who have distributed it widely and publicly under the terms of the Free Software Foundation (see below for more details). It consists of four files:

simple_klatt.c, simple_parwave.c, parwave.h, proto.h

(4) Some simple Prolog programs, presented and discussed in the book.

dog_grammar.pl
dog_grammar2.pl
dog_grammar3.pl
stolcke_grammar1.pl
stolcke_grammar2.pl
stolcke_grammar3.pl

(5) Third-party software that is general available to be freely downloaded on the internet, under license terms that allow for copying and distribution to others. License terms for these are summarised below and, where required, described in full in files on the CD-ROM .

These files are in three folders: DJGPP, pfe and SLP.

3. Installation

Put the CD-ROM in the CD-ROM drive and open it, usually by clicking on the "My Computer" icon again. Double click on the CD drive (this is usually drive D). Open the "Software" folder, and select the folders DJGPP, pfe and SLP. Copy those three folders to your hard drive. (This is usually drive C, but if you are working on a networked computer in an institutional setting it may have a different name or letter: it doesn't matter exactly where you put the SLP folder, as long as you know where it is.) Further installation notes on individual programs are given below and/or in the book.

4. Help! (If it doesn't work ...)

If installation or compilation of any of the software doesn't work, please take the following action:

(1) First, read the text in the book or in these notes again. Check that you are using the right program or file names, and that anything you have typed is entered correctly. Please pay special attention to capitalization and punctuation.

(2) If that doesn't fix it, please consult the website, www.islp.org.uk, and check through the bug reports listed there. If there is really something wrong with the software, chances are that someone else has found it first and has let me know. In that case, I will provide details on the website about the problem, and suggest how to fix it.

(3) If that doesn't help, please ask someone you know - someone who knows a thing or two about PCs and programming - to lend you a hand.

(4) Finally, if and only if both you and your local advisor are very confident that there is something wrong with the software, go to the website, www.islp.org.uk, and use the form there to send in a bug report. Please remember two things:

(i) Our disclaimer of warranty (see section 1 above).
(ii) I am very keen to ensure that all genuine problems are resolved properly, with bugs documented and reported on the web site so that other readers can also find out how to fix them. However, I cannot offer any kind of an individual trouble-shooting service. I cannot be your individual tutor or computing support person. I will, of course, do my best to sort out definite faults in my software, for the collective benefit of all who use this book.

5. Using the Command Prompt interface

Many of the programs covered in this course require you to use the Command Prompt interface to Windows. This is what used to be called "MS-DOS", a text-based operating system that Microsoft developed before Windows. To install the DJGPP C compiler, and to compile the C programs in the book, you need to become familiar with this interface to your computer. Mainly, you just need to follow the instructions about what to type exactly as they are given below, and in the book (e.g. in Exercise 2.5).

To open the Command Prompt window, click on the Start button, then click "Programs", then "Accessories", then "Command Prompt".

There are hundreds if not thousands of textbooks and manuals on MS-DOS. You should not need to refer to any of them in order to follow this course. If you want a recommendation, the manual I use is Special Edition Using MS-DOS 6.22, Second Edition, by Allen L. Wyatt, Bruce Hallberg, Ed Tiley and Jon Paisley, published in 2000 by Que Corporation. But I'm sure that there are many other good manuals. The main thing to check is that you use a relatively recent edition.

As you become more familiar with the Command Prompt interface, you should begin to feel like a real computer expert!



pfe: the Programmer's File Editor


A text editor written by Alan Phillips, Lancaster University Computer Centre, and widely copied and re-copied with his consent on numerous download sites on the internet. The software consists of the collection of files in the pfe subdirectory. To install it, you only need to copy the files to your hard disk (e.g. drive C), right-click on PFE32.EXE, create a shortcut, and move the shortcut to the desktop. To use PFE all you then have to do is click on the PFE icon on the desktop, or drag a text file onto the PFE icon.


DJGPP: a C compiler for MS-DOS

A freely available C compiler, GCC, has been available for many different kinds of computer for some time. It is produced by the Free Software Foundation (www.fsf.org), and can only be distributed under copyright terms that require all sources (original programs), not just compiled executable files, to be included along with the executables, in accordance with their philosophy of openness. 

D. J. Delorie and other developers have ported GCC to MS-DOS running on Intel 386 or higher processors. Current and earlier versions of this C compiler, DJGPP, can be found at D. J. Delorie’s very informative web site (http://www.delorie.com/djgpp), including a form-based guide to help you determine what zip files to download (when the version supplied here becomes out of date!). Software for version 2.03 is included on this CD-ROM, in the folder Software/DJGPP. The file README.1ST in that folder is a short guide to installation. My even shorter guide is as follows:

  1. Create a directory called C:\DJGPP. Select and copy all the files from the DJGPP folder on the CD-ROM to C:\DJGPP. 
  2. Use an editor (such as PFE) to add the following two lines to the file C:\autoexec.bat:

    1. set DJGPP=C:\DJGPP\DJGPP.ENV

      set PATH=C:\DJGPP\BIN;%PATH%

  3. Restart your computer.
  4. You can now use the GCC compiler from a Command Prompt window (i.e. an MS-DOS window). For example, to compile and link a group of files, such as coswave.c in chapter 2, change to the directory where those files are located by typing:
    1.  
      cd \slp

      Next, type:
      gcc –c coswave.c
      gcc –o bleep.exe coswave.o

    Nothing obvious happens, though if all has gone well the file bleep.exe will have been created in the same directory as coswave.c.

w32pl525.exe: the SWI-Prolog interpreter

This is a reliable Edinburgh-standard version of Prolog developed in the Psychology Department of the University of Amsterdam, and now made freely available under Free Software Foundation terms (the Lesser GNU Public License).

To install, click on its icon you will be guided step-by-step through a self-installation process which will create various subdirectories and will set up file properties so that clicking on files with the suffix “.pl” (for “Prolog”) will execute them using the SWI-Prolog interpreter.
 
The SWI-Prolog home page, www.swi-prolog.org, provides a good deal of information about its many virtues.  


Last revised 22/11/05