Skip to content

Commit 96f988a

Browse files
antmarakisnorvig
authored andcommitted
Fix text.py - aima-data links (aimacode#637)
* Update nlp_apps.ipynb * Update test_text.py
1 parent af855d0 commit 96f988a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nlp_apps.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"\n",
5050
"P_flatland = NgramCharModel(2, wordseq)\n",
5151
"\n",
52-
"faust = open_data(\"faust.txt\").read()\n",
52+
"faust = open_data(\"GE-text/faust.txt\").read()\n",
5353
"wordseq = words(faust)\n",
5454
"\n",
5555
"P_faust = NgramCharModel(2, wordseq)"

tests/test_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_char_models():
123123

124124
def test_samples():
125125
story = open_data("EN-text/flatland.txt").read()
126-
story += open_data("EN-text/gutenberg.txt").read()
126+
story += open_data("gutenberg.txt").read()
127127
wordseq = words(story)
128128
P1 = UnigramWordModel(wordseq)
129129
P2 = NgramWordModel(2, wordseq)
@@ -164,7 +164,7 @@ def test_shift_decoding():
164164

165165

166166
def test_permutation_decoder():
167-
gutenberg = open_data("EN-text/gutenberg.txt").read()
167+
gutenberg = open_data("gutenberg.txt").read()
168168
flatland = open_data("EN-text/flatland.txt").read()
169169

170170
pd = PermutationDecoder(canonicalize(gutenberg))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy