SLP Home > SLP Errata

## Errata for the 1st and 2nd Printings (as of 5/25/2001)

The following are the known bugs from the first few printings of Speech and Language Processing. Page numbers in red indicate errors that might lead readers seriously astray; the rest are mainly typos. If you would rather not wade through all of these, you can view just the red errata . Our sincere thanks to all who notified us of errors in the text.

### Preface

- Page xxv, line 12: Add Marti Hearst to the list of careful readers of early drafts.

### Chapter 2

- Page 25, line 9: Change "needn't" to "needed".
- Page 30, Figure 2.6: Perl's \w matches any alphanumeric or an underscore not a space. So replace the space symbol with an underscore.
- Page 31: Substitution Section: The replacement part of a substitution isn't really a regexp, it's a pattern. More precisely its a string that can optionally contain some number of number operators. So the second line of this section should be something like the following:

       s/regexp/pattern/

- Page 34, line -3: Change "four transitions" to "five transitions".

### Chapter 3

- Page 68, last line: Change "the the" to "the".
- Page 85, line -3: Change "important" to "importance".
- Page 88, line 13: Change "Roland Kaplan" to "Ronald Kaplan".

### Chapter 4

- Page 92, line 13: Change "is take" to "is to take".
- Page 93, Sec 4.1, line 5: Change "bears" to "bear".
- Page 94, Figure 4.1: Add a closing ] to ARPAbet transcription of nutmeg.
- Page 94, Figure 4.1: Underline "uh" in "uh-oh".
- Page 95, Figure 4.2: Change the IPA and ARPAbet transcriptions of the first "woodruff" example to be the same as the second one (ie ARPAbet [w uh d r ax f]).
- Page 95, Figure 4.2: Change [uh] to [ah] in the "buttercup" example.
- Page 95, Figure 4.2: Change [u] to [uw] in the ARPAbet transcription of "feverfew".
- Page 95, Figure 4.2: Move the underscore on the second "tulip" example to the "i".
- Page 108, line 12: Change "avoiding" to "avoid".
- Page 108, line 14: Change "touched in" to "touched on".
- Page 108, line -10: Change "lexical z-insertion" to just "lexical z".
- Page 108, Footnote 5: Change "rules" to "rule".
- Page 109, line 4: Change "an lexical" to "a lexical".
- Page 109, line -3: Change "both the" to "both".
- Page 109, line -2: Change "assuming to "assume".
- Page 116, line 8: Change "!*" to "*!".
- Page 123, line 11: Change ''Buffalo'' to ``Buffalo''.
- Page 126, line -13: Change the ":" to a "." following "lexical entries".
- Page 130, line -11: Change "In generally" to "In general".
- Page 132, line 15: Change "modals" to "models".
- Page 164, line -12: Replace "work" with "word".

### Chapter 5

- Page 147, line -16: Delete the extra closing quotes on "reduced".
- Page 148, line 21: Change "chose" to "choose".
- Page 148, line -1: Change "P(x|O)" to "P(x|y)".
- Page 149, line 13: Change "can be computing" to "can be computed".
- Page 149, line 15: Change "Prior" to "prior".
- Page 151, line 7: Delete unneeded closing paren after "vocabulary".
- Page 151, line -15: Replace "unsolveable" with "unsolvable".
- Page 154, line 14: Italicize "intention" and "execution".
- Page 154, line 15: Change "a operation" to "an operation".
- Page 154, line 16: Change "as show in" to "as shown in".
- Page 156, line 4: Replace "computing" with "computed".
- Page 156, Equation 5.9: Change "P(t|c)" to "distance[i,j]".
- Page 156, Figure 5.5: There are two major changes to this code: (1) we need to initialize all of the 0th row and column to their respective indexes as in Figure 5.6, and (2) the two main loops should start at 1 not 0. We'll have a replacement page for this soon.
- Page 157, Figure 5.6: There are five errors in this table: entry [1,4] 5 should be a 3; entry [6,3] 9 should be a 7; entry [7,1] 8 should be a 6; entry [9,2] 11 should be 9; and entry[9,5] 12 should be 10.
- Page 160, lines 19 and 20: Add a "]" after the tf and "[" before the d3.
- Page 161, Figure 5.9: There's a [d] missing from the IPA Lexical transcription of "mindboggling".
- Page 162, line -14: Change "vowel" to "vowels".
- Page 167, second table of probabilities: In the preceding paragraph we stipulated that we were interested in the most likely word for [ni] where it was preceded by the word "I". Unfortunately, the fronting rule we use for "new" is conditioned on a following "y", which we don't have yet. So P(y|w) for "new" isn't relevant in this case. This leaves "neat" as the top choice. Fortunately, the argument for why "need" is better than "neat" is the same as for "new": in context "I need" should be more likely than "I neat".
- Page 172, line 18: Change "HMMS" to "HMMs".
- Page 176, Figure 5.16: , The line in the inner loop doesn't perform the required sum. It should read:

forward[s',t+1] <-- forward[s',t+1] + forward[s,t]*a[s,s']*b[s',o_t]

- Page 176, Figure 5.17: Replace .00062 in the upper right corner with .000062.
- Page 177, line 5: Change "possibly" to "possible".
- Page 180, Figure 5.20: Delete the extra "." in "..00036".
- Page 180, line 1: Change "important" to "important role".
- Page 180, line 2: Change "algorithm" to "algorithms".
- Page 183, Figure 5.21: Change ID(D) to ID(I) in parts (c) and (d).
- Page 184, line -12: Change "for each words" to "for each word".
- Page 186, line -1: Change "particularly" to "particularly useful".
- Page 187, line 10: Change "existing" to "existed".

### Chapter 6

- Page 198, line 15: Delete extraneous period in "...Center. brought...".
- Page 200, line 1: Change .002 to .001 in the calculation.
- Page 201, line 4: Change "way" to "say".
- Page 202, line -3: Replace "generated" with "generating".
- Page 204, line 8: Change "'test' to "test".
- Page 208, line -5: Substitute "bigrams" for "bigram".
- Page 209, line 3: Change "2931" to "2831".
- Page 210, Figure 6.8: A number of the counts in this table are off. Here are the correct entries.

| I | want | to | eat | Chinese | food | lunch
I | 6.12 | 740 | 0.680 | 9.52 | 0.680 | 0.680 | 0.680
want | 1.71 | 0.429 | 338 | 0.429 | 3.09 | 3.86 | 3.00
to | 2.67 | 0.668 | 7.35 | 575 | 2.67 | 0.668 | 8.69
eat | 0.367 | 0.367 | 1.10 | 0.367 | 7.35 | 1.10 | 19.5
Chinese | 0.349 | 0.116 | 0.116 | 0.116 | 0.116 | 14.1 | 0.233
food | 9.64 | 0.482 | 8.68 | 0.482 | 0.482 | 0.482 | 0.482
lunch | 1.11 | 0.221 | 0.221 | 0.221 | 0.221 | 0.442 | 0.221

- Page 212, Equation 6.23: Replace each of the 5 w_{i-1} with a w_{x}.
- Page 212, Equation 6.24: Remove the summation and add an "if (c_{w_{x}w_{i}} > 0)" to the right side of the equation.
- Page 215, line 5: Change "is estimating" to "is estimated".
- Page 215, line -4: Change "has a count of" to "have a count of".
- Page 216, line 9: Change "was 0" to "were 0".
- Page 218, Equation 6.35: Change the right side denominator from "c(w_{1}^{n-N+1})" to "c(w_{n-N+1}^{n-1})".
- Page 219, Equation 6.37: To make the normalization of beta explicit, replace the existing equation with the following:

      \begin{eqnarray}
      \alpha(w_{n-N+1}^{n-1}) &=&\frac
      {\beta(w_{n-N+1}^{n-1})}
      {\sum_{w_{n}:c(w_{n-N+1}^{n})=0}P{(w_{n}|w_{n-N+2}^{n-1})}}\nonumber\\
      &=&\frac
      {1 - \sum_{w_{n}:c(w_{n-N+1}^{n})>0}\tilde{P}{(w_{n}|w_{n-N+1}^{n-1})}}
      {1 - \sum_{w_{n}:c(w_{n-N+1}^{n})>0}\tilde{P}{(w_{n}|w_{n-N+2}^{n-1})}}
      \end{eqnarray}

- Page 219, line 11: Change the "m-1" superscript of c to "n-1".
- Page 219, Equations 6.38, 6.39, 6.40: Add an "if c(w_{n-N+1}^{n-1}) = 0" to each of these equations.
- Page 219, Equation 6.40: Delete the tilde over the beta.
- Page 219, unnumbered equation at bottom of page: Replace the "n"s with "i"s in the superscripted and subscripted arguments to alpha.
- Page 220, line 7: Delete the extra "deleted interpolation".
- Page 226, Equation 6.49: Both expressions are missing minus signs. They should read lim - 1/n.
- Page 227, line 9: Add a closing paren after "p".
- Page 227, Equation 6.51: Missing the same minus sign as 6.49.
- Page 230, line 16: Replace "same subsample" with "the same subsample".

### Chapter 7

- Page 239, line -7: Change "can be computing" to "can be computed".
- Page 240, line -12: Delete extraneous closing paren.
- Page 246, Figure 7.6: Change "i" to "iy" on x axis.
- Page 247, line -2: Replace "Figure 7.9 shows" with "Figure 7.10 shows".
- Page 248, line -6: Change "i dh ax" to "iy dh ax".
- Page 249, Figure 7.9 caption: Change "minimum" to "maximum".
- Page 255, line: Change "a A*" with "an A*".
- Page 256, Figure 7.14: The main loop is missing from this pseudocode. Add a "While(queue is not empty)" after the initialization of the queue and before the Pop.
- Page 256, Figure 7.14 caption: Change "possibly" to "possible".
- Page 266, line -13: Change "a integer" to "an integer".
- Page 266, line -4: Replace the definition of cepstral with the following:
  - One popular feature set is cepstral coefficients, which are computed by an efficient recursion which is conceptually equivalent to taking the inverse Fourier transform of the log spectrum corresponding to the predictor coefficients.
- Page 275, line 12: Add a "." after "spectral envelope".
- Page 276, line -13: Add a "." after "naturally occurring speech".
- Page 277, line 7: Change "a utterance" to "an utterance".
- Page 278, line -10: Change "and utterance" to "an utterance".
- Page 279, second bullet item: Replace "wound" with "sound".
- Page 280, line 4: delete extraneous closing paren.

### Chapter 8

- Page 297, Figure 8.6: Tag for Personal Pronoun should be PRP.
- Page 297, Figure 8.6: Tag for Possessive Pronoun should be PRP$.
- Page 298, line 18: Change "infinite" to "infinitive".
- Page 306, line 10: Replace "only its tag" with "only on its tag".
- Page 308, line 1: Replace "evaluating" with "evaluated".·
- Page 309, line -1: Change "three stages" to "last two stages".
- Page 311, Figure 8.10, caption: Change "transformations" to "transformation".
- Page 314, line 12: Change "training set." with "training set,".
- Page 316, line 1: Change "al" to "-al".
- Page 320, Exercise 8.4: In both equations, the summations should range from i = 1 to n, not i-1 to n.

### Chapter 9

- Page 338, GerundV rule: preferring should be preferring
- Page 342, line -3: Delete extraneous closing paren.
- Page 355, line 1: Change "references" to "reference".
- Page 356, Ex 9.6: Change "VPs" to "VP".
- Page 356, Ex 9.9: Change "treated" to "treating".

### Chapter 10

- Page 357, line -10: Replace "a" with "an" before "important:.
- Page 361, line -7: Change "Figure 10.4 show" to "Figure 10.4 shows".
- Page 366, Figure 10.6: In the following, assume that line numbering starts with the assignment of agenda as line 1.

- The "CAT" function on line 7 returns the grammatical category of a node in a parse tree. So this line is checking to see if the grammatical category of the current node to be expanded in this search state is a part-of-speech category.
- The "if" on line 8 should be similar to the one on line 7, ie. CAT(NODE-TO-EXPAND(current-search-state))
- The "subset" symbol on line 9 should be an "in" instead".
- Remove the "else return reject" on lines 12 and 13; it causes a premature termination of the search.
- The call to NEXT on line 19 should be a POP since this algorithm is explicitly depth-first.

- Page 372, line 8: Change "a right-branching" to "right-branching".
- Page 374, line -7: Replace "parsers" with "parses".
- Page 381, Figure 10.16: A DOT is missing in the call to ENQUEUE in the scanner function; the first part of the first arg should be B -> word[j] DOT.
- Page 381, Figure 10.16, ENQUEUE definition: The use of PUSH here is a little unclear. The newly added states need to go at the end of the chart-entry, not the front, to ensure that they get processed. If that matches your intuitions for PUSH (Perl and Python hackers for example) then leave it as is. If you're a Lisper then you can go with PushEnd or Append.
- Page 384, Figure 10.17: The order of the states in this chart doesn't reflect the order in which the algorithm would enter them. Chart[0] should look like the following:

Gamma -> · S
S -> · NP VP
S -> · Aux NP VP
S -> · VP
NP -> · Det NOMINAL
NP -> · Proper-Noun
VP -> · Verb
VP -> · Verb NP

- Page 388, line 1: Change "collection" to "collection of".
- Page 389, DETP-INCP rule: Although the formatting of this is very confusing, the braces do all match up correctly. The first four lines encode the first option as a big disjunction, which can be followed by an optional "other". The second alternative is an option DET-CP followed by the word "other".
- Page 389, AdjP rule: Change "({Q-er|Q-est}" to "({Q-er|Q-est})".
- Page 389, AdjP rule: Replace "N[sing,!Time-NP]" with "Noun-Sing-NonTime"
- Page 389, HdNn rule: Replace "[!Time-NP]" with "Noun-NonTime", and replace "CommonN[!Time-NP]" with "CommonNoun-NonTime".
- Page 389, preN rule: Change "preN" to "PreN".
- Page 389, preN2 rule: Change "preN2" to "PreN2".
- Page 390, Figure 10.20: Change "Vparticle" to to "Vparticiple".
- Page 390, Figure 10.21: Change "Vparticle" to to "Vparticiple", change "Nsing[!timenp]" to "Noun-Sing-NonTime".
- Page 390, Figure 10.21: Change "Vparticle" to to "Vparticiple", change "Nsing[!timenp]" to "Noun-Sing-NonTime".
- Page 390, Figure 10.21: Various arcs are messed up: Delete both arcs between states 9 and 3; add an epsilon transition from state 9 to state 4, and another from state 9 to state 3.
- Page 392, line 1: Change "staring" to "starting".

### Chapter 11

- Page 397, line 6: Replace "called a" with "called an".
- Page 398, line -7: Change "features structures" with "feature structures".
- Page 405, Section 11.3 header: Change "Features" to "Feature".
- Page 408, Aux rules: Change "S Agreement... " with "Aux Agreement..."
- Page 419, Ex 11.21: Change "CONTENTS" to "CONTENT" in 11.21.
- Page 427, Fig 11.11: Dangling pointer labeled CT should point to a NULL value.
- Page 427, Fig 11.11: Pointers pointing in the wrong direction...?
- Page 431, Figure 11.12, Completer def: Change new -- dag to new-dag.
- Page 431, Figure 11.12, Enqueue def: push wrong?
- Page 436, line -11: Change "can captured" to "can be captured".
- Page 437, line -10: Change "have" to "having".
- Page 437, line -1: Insert "Grammar" after "Generalized Phrase Structure".
- Page 438, line 7: Change "syntactitions" to "syntactitians".
- Page 439, line -7: Change "at the type" to "at the top".
- Page 440, line 11: Change "and constraint" to "and constrain".
- Page 444, Ex 11.2, Change "italian" to "Italian".

### Chapter 12

- Page 449, Figure 12.1: Change the probability of Denver to .6 (To make Proper-Noun sum to 1).
- Pages 450 and 451, Equations 12.5, 12.6 and Figure 12.2: The rule NP -> Pro is mistakenly duplicated in the lists of rules applied in these parses. Correspondingly both 12.5 and 12.6 have an extra .40 in their product.
- Page 455, Figure 12.3: The probabilistic CYK algorithm in this figure is flawed in a number of ways. See the replacement page for a correct version.
- Page 457, line 13: Change "VP -> NP PP" to "VP -> VP PP".
- Page 469, example 12.30: This example is due to Marti Hearst.
- Page 470, line -1: Change (12.31) to (12.30).
- Page 475, line 2: Replace "algorithm" with "algorithms".

### Chapter 13

- Page 481, line -18: Change "Our" to "Or".
- Page 494, line -14: Change "confused" to "confuse".
- Page 495, line 6: Change "reader" to "readers".

### Chapter 14

- Page 505, line -5: Change "phenomenon" to "phenomena".
- Page 521, line 17: Change "are such any" to "are any".
- Page 526, line -9: Replace "formula" with "formulas".
- Page 527, first bullet: Change "predicate, rather" to "predicate; rather".
- Page 534, line -9: Change "to taken" to "to be taken".
- Page 534, line -2: Change "there two" to "there are two".
- Page 539, line -15: Substitute "reside" for "resides".
- Page 541, line 17: Change "categories" to boldface.
- Page 542, line 9: Change "amount work" to "amount of work".

### Chapter 15

- Page 552, line 10: Change "Schonkfinkel" to "Schonfinkel" here and in the bibliography.
- Page 552, footnote: Change "Schonkfinkelization" to "Schonfinkelization".
- Page 560, last line of paragraph 4: Change "if can be" to "if it can be".
- Page 569, line 4: Change "access the various" to "access to the various".
- Page 569, line 9: Change "is this" to "in this".
- Page 575, line 6: Replace "what know" with "what we know".
- Page 581, line 3: Change "Chapter 5" to "Chapter 4".
- Page 583, fourth bullet: Change "on an input" to "of an input".

### Chapter 16

- Page 591, line 4: Change "dictionaries" to "dictionary".
- Page 594, line 4: Change "is of primarily" to "is primarily".
- Page 597, line 17: Change "a device has" to "a device that has"
- Page 597, line -10: Change "or distinct" to "of distinct".
- Page 598, line -12: Change "can substituted" to "can be substituted".
- Page 599, line -11: Replace "with one" with "with one of".
- Page 601, line 13: Change "There a" to "There are a".
- Page 601, line 17: Change "it is merely" to "it merely".
- Page 603, line 8: Change "This figures" to "This figure".
- Page 605, Figure 16.6: Change "Adverb" to "Antonym".
- Page 607, Example 16.23: In the example its a "drawer" being opened, in the formula it is a "door". Take your pick.
- Page 610, Example 16.29: The "key" should be an Instrument not an Agent in this example.
- Page 612, line 15: Change the extraneous open paren before "or" to a ",".
- Page 614, line -10: Change "an corpus-based" to "a corpus-based".
- Page 616, line -12: Change "the fairly" to "a fairly".
- Page 617, lines -6 an -9: Change the "Eater" predicates to "Agent".
- Page 619, line 13: Replace "such WordNet" with "such as WordNet".
- Page 621, line 2: Change "eleven" to "ten".
- Page 621, line -8: Replace "to here" with "to her".
- Page 624, line 12: Change "of the resuscitate" to "of the word resuscitate".
- Page 624, Ex 16.61: Change "dedicated a full-scale" to "dedicated a full-scale factory".

### Chapter 17

- Page 642, line 13: Replace "is then" with "can then".
- Page 643, line -7: Change "of a such" to "of such".
- Page 650, line 10: The equation for computing the length of a vector is missing a square root. It should be:
Sqrt(Sum (w_i **2)).
- Page 650, Matrix A: This matrix is transposed. It should look like

.41 | .98 | 0
.81 | 0 | .98
.41 | .16 | .19

- Page 659, line -16: Change "many of benefits" to "many of the benefits".
- Page 660, line 6: Change "a importance weight" to "an importance weight".

### Chapter 21

- Page 801, line 6: Change "the found" to "found".
- Page 805, Figure 21.1: Change "didi (older)" to didi (younger)".
- Page 825, line 5: Change "so as well" to "do as well".

### Appendix D

- Page 844, Equation D.3: In alpha_h(1) change "h" to "j".
- Page 845, Equation D.6: Change "beta_i(o_t)" to beta_i(t).
- Page 845, Equation D.7: Change "beta_i(t)" to beta_i(T).