Language Processing with Perl and Prolog

by Pierre Nugues
Second edition: August 2014
Pages: 662
Published by Springer

Errata

Chapter 2

Page 26, Table 2.2. The words schmal and eng are better examples of synonyms in German with the phrases schmales Gesicht and enge Kleidung. Reported by Harald Vajkonny.

Page 31, Title of Section 2.2.5. Replace Automata with Automaton. Reported by Michael Covington.

Page 31, Section 2.2.5. Second item of the bulleted list, replace FN with QD and QD with FD. Reported by Hrafn Loftsson.

Chapter 3

Pages 79-80. Figures 3.6-3.8. The value of the node that covers C, D, F, G, B, and H should read 54362 instead of 54462. Reported by Hidetosi Sirai.

Page 80. Figures 3.7 and 3.8. The value of the root node in Fig. 3.7 and the right daughter node of the root in Fig. 3.8 should be 96833 instead of 96933. Reported by Hidetosi Sirai.

Page 80, last line of Sect. 3.5.2. The entropy value, 2.27, contains a round-off error. Replace it with 2.31. It was obtained using the expression: 0.25*log2(0.25)+0.03*log2(0.03)+0.08*log2(0.08)+0.11*log2(0.11)+0.42*log2(0.42)+0.03*log2(0.03)+0.03*log2(0.03)+0.03*log2(0.03). Use the symbol counts instead: (42471/168011)*log2(42471/168011) + (5762/168011)*log2(5762/168011) + ... Reported by Hidetosi Sirai.

Page 80, last equation, second term of the right member. Replace p21 with p2. Reported by Hidetosi Sirai.

Chapter 4

Page 95, Section 4.4.4. The following code:

for ($i=0; $i <= $#words; $i++) { 
  if (!exists($frequency_bigrams{$bigrams[$i]})) { 
    $frequency_bigrams{$bigrams[$i]} = 1; 
  } 
  ... 
}

should be:

for ($i=0; $i <= $#bigrams; $i++) { 
  if (!exists($frequency_bigrams{$bigrams[$i]})) { 
    $frequency_bigrams{$bigrams[$i]} = 1; 
  }
  ...
}

Reported by Hrafn Loftsson.

Page 96, Section 4.5.1. Replace:

P(S) = P(w1)P(w2|w1)P(w3|w1,w2)P(wn|w1, ..., wn-1)

with:

P(S) = P(w1)P(w2|w1)P(w3|w1,w2)...P(wn|w1, ..., wn-1)

Page 102, Section 4.6.3, second line. Replace Its vocabulary of 8,634 words generates 8,6342 = 74,545,956 bigrams with Its vocabulary of 8,635 words generates 8,6352 = 74,563,225 bigrams. Reported by Adam Przepiórkowski.

Page 108, Section 4.9.1. The definitions of n1, k1, n2, and k2 are missing. Add

k1 = C(w1, w2), n1 = C(w1), k2 = C(w2) - C(w1, w2), and n2 = N - C(w1).

Page 111, Section 4.11. The reference to Stolcke 2002 is missing from the References section. Add

Stolcke, A. (2002). SRILM -- an extensible language modeling toolkit. In Proceedings International Conference Spoken Language Processing, Denver.

Chapter 5

Page 117, Table 5.6, 3rd column, lis should read lit.

Page 124, Figure 5.2. Replace suffixes with prefixes and prefixes with suffixes.

Page 125, Figure 5.3. sungst should read sangst.

Page 137, Figure 5.9. Replace the figure with

Page 137, Section 5.4.7. First item of the bulleted list. Replace "Let T be transducer" with "Let T be a transducer." Reported by Hrafn Loftsson.

Page 140, Second paragraph, last line. Replace major harmful the side effects with major harmful side effects. Reported by Adam Przepiórkowski.

Page 141, Penultimate paragraph. Change cross-reference from Figure 5.5.3 to Figure 5.13. Last paragraph. Change cross-reference from Figure 5.5.3 to Figure 5.14. Reported by Adam Przepiórkowski.

Page 142, Fig.5.13. Delete the second : after Intermediate form. Reported by Adam Przepiórkowski.

Chapter 6

Page 151, 10th line. Replace is more general that with is more general than. Reported by Adam Przepiórkowski.

Page 154, Sect. 6.4.2, last line. Replace the sum of rows and columns with the sum of rows. Reported by Adam Przepiórkowski.

Page 159, Table 6.12, the 19th tag should read PRP$ instead of PP$. Note that this corresponds to the guidelines available from the Penn Treebank site and updates the original Computational linguistics' article (Marcus et al. 1993).

Chapter 7

Page 163, First equation. Add \mathop{\arg \max}\limits_{T} to the right member. Second and third equations. Add the subscript T to arg max. Reported by Adam Przepiórkowski.

Page 166, last line of the second paragraph, replace complexity of N^T with complexity of T^N.

Page 170, Sect. 7.2.3, first line. Replace able represent with able to represent. Reported by Adam Przepiórkowski.

Page 174, Sect. 7.26, first line of the second paragraph. Replace P(ot+1, ot+2, ot+3, ..., oT, st = qj|λ) with P(ot+1, ot+2, ot+3, ..., oT | st = qj, λ) . Reported by Adam Przepiórkowski.

Page 180, first line, replace x is typed y with y is typed x.

Page 180, in the transposition formula, line 7, replace the denominator with C(cp, cp+1).

Chapter 8

Page 204, Section 8.7.2. Replace np('Mark'] with np('Mark') and ?- s(S, ['Mark', is, a waiter], []) with ?- s(S, ['Mark', is, a, waiter], []). Both errors reported by Hrafn Loftsson.

Chapter 9

Page 222, Table 9.4, Third column. Replace dem Tisch with den Tisch.

Page 223, Section 9.4.2, first line from bottom. Replace its absence with their absence. Reported by Adam Przepiórkowski.

Page 226. Move the sentence The lexical rules for this text are: to the top of page 227. Reported by Adam Przepiórkowski.

Page 237, Section 9.9.1. Replace The FASTUS system was designed at the Stanford Research Institute to extract information with The FASTUS system was designed at the Stanford Research Institute (SRI) to extract information because the SRI abbreviation is used in Section 9.9.2. Improvement proposed by Hrafn Loftsson.

Page 240, last line of the second paragraph, replace a recall of 100 and a precision of 0 with a precision of 100 and a recall of 0.

Chapter 11

Page 286, Subsection The Completer, last sentence of the page. Replace the rules with a dot to the right of it with the rules with a dot to the left of it. Reported by Hrafn Loftsson.

Page 289, Eighth line. Replace earley_parser/2 with earley_parser/5. Reported by Adam Przepiórkowski.

Page 289, Fourth paragraph. Replace earley_parser/2 with earley_parser/3, twice. Reported by Adam Przepiórkowski.

Page 289, Fourth paragraph, last line. Replace the Prolog database with in the chart FinalChart, twice. Reported by Adam Przepiórkowski.

Page 292, Table 11.5. Replace Prolog database with chart and remove in the database from the heading of the second column. Reported by Adam Przepiórkowski.

Page 295, Table 11.6, left column. The pronoun rule is duplicated. Remove one of them. Reported by Adam Przepiórkowski.

Page 305, first item of the first bulleted list. Replace LEX(n') <-- LEX(n) with LEX(n) <-- LEX(n').

Chapter 12

Page 325, Table 12.4. Swap brought and served in the first column. Reported by Hrafn Loftsson.

Page 327, Sect. 12.7.3, last line of the first paragraph. Replace the world of logic quantifiers with the world of standard first-order logic quantifiers. Reported by Adam Przepiórkowski.

Page 328 and Figure 12.4, page 329. Change cap(X) to cap(Y) in the three logical forms representing the phrase The waiter who has a cap as well as in Figure 12.4. The forms should read:
the(X, (waiter(X), a(Y, cap(Y), has(X, Y))), P).
Reported by Allan Berrocal.

Page 330, Sect. 12.8.1. Replace the Y variable with X in the two first DCG rules. Reported by Adam Przepiórkowski.

Page 330, Sect. 12.8.1. Replace the last DCG rule with: s(Sem) --> np((Y^SemRest)^Sem), vp(Y^SemRest).

Page 340. Sect. 12.11. The reference to Tarski is missing. Add: Tarski, A. (1944). The semantic conception of truth and the foundations of semantics. Philosophy and Phenomenological Research, 4:341--375. Reported by Adam Przepiórkowski.

Chapter 13

Page 357, eleventh line. Replace to annotated with to annotate. Reported by Adam Przepiórkowski.

Page 358, Right member of the first equation, second line. Replace sj with si.

Page 359, equation. Change the subscript index of arg max from i to j. Reported by Adam Przepiórkowski.

Page 361, Outer loop item, fifth line. Change In Yarowksy's paper to In Yarowsky's paper. Reported by Adam Przepiórkowski.

Pages 368, second item of the numbered list, and 369, Table 13.8, second row, replace <Agent> with <Avenger>.

Page 371, second paragraph. Replace Using Bayes' theorem, we rewrite with Using Bayes' theorem and independence assumptions, we rewrite. Reported by Adam Przepiórkowski.

Page 373, Section 13.9. Third line, replace though with thought.

Chapter 14

Page 389. Section 14.7.1, last sentence of the second paragraph. Replace The methods ranks with The method ranks. Reported by Adam Przepiórkowski.

Page 390. Section 14.7.2. First paragraph, third line. Replace his with her. Reported by Hidetosi Sirai.

Page 394, tenth line from bottom. Change the cross-reference "Figure 14.3" to "Table 14.7". Reported by Allan Berrocal.

Page 395, Table 14.7. Replace the line NPj is not an apposition to NPi with NPj is an apposition to NPi. Reported by Adam Przepiórkowski.

Appendix A

Pages 459, Section A.9.5, first program. Replace the reverse/2 program with:

reverse([],[]). 
reverse([X | XS], YS) :- 
  reverse(XS, RXS), 
  append(RXS, [X], YS). 

Institutionen för Datavetenskap 2014. Ansvarig: Pierre Nugues
Last update: Friday, 05-Sep-2014 15:00:40 CEST