From fb9548a454fc7a993fc4ef97b62a8b4f16c395e9 Mon Sep 17 00:00:00 2001 From: Kester Date: Fri, 6 Nov 2020 17:38:54 +0800 Subject: [PATCH 1/2] Fix System Message: ERROR/3 (ch03.rst2, line 2262) --- book/ch03.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/book/ch03.rst b/book/ch03.rst index 0f1905b9..cf7d3d86 100644 --- a/book/ch03.rst +++ b/book/ch03.rst @@ -2259,6 +2259,7 @@ must be called with exactly the same number of arguments. Arguments to ``format()`` are consumed left to right, and any superfluous arguments are simply ignored. + >>> '{} wants a {}'.format ('Lee', 'sandwich', 'for lunch') 'Lee wants a sandwich' From 9fc5272b3bbe4076bf2adcbc1c3b9f7d20ad1f96 Mon Sep 17 00:00:00 2001 From: Kester Date: Sun, 8 Nov 2020 15:40:41 +0800 Subject: [PATCH 2/2] fix #215 --- book/ch07.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/ch07.rst b/book/ch07.rst index e8ec52e1..bf602836 100644 --- a/book/ch07.rst +++ b/book/ch07.rst @@ -1177,7 +1177,7 @@ The listing in code-traverse_ demonstrates this. traverse(child) print(')', end=" ") - >>> t = nltk.Tree('(S (NP Alice) (VP chased (NP the rabbit)))') + >>> t = nltk.Tree.fromstring('(S (NP Alice) (VP chased (NP the rabbit)))') >>> traverse(t) ( S ( NP Alice ) ( VP chased ( NP the rabbit ) ) )