Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Apr 2, 2013
1 parent 564fd22 commit b2ac0a9
Show file tree
Hide file tree
Showing 3 changed files with 919 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Chapter 3 - Text Preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
" # insert your code here\n",
" \n",
"quote = ['To','be','or','not','to','be']\n",
"print(get_ngrams(quote) == [['to','be','or'],['be','or','not'],['or','not','to'],['not','to','be']])"
"print(get_ngrams(quote,3) == [['To','be','or'],['be','or','not'],['or','not','to'],['not','to','be']])"
],
"language": "python",
"metadata": {},
Expand Down Expand Up @@ -384,7 +384,7 @@
"input": [
"for filepath in find_corpus_files(\"data/\"):\n",
" text = read_corpus_file(filepath)\n",
" print filepath + \" has \" + len(text) + \" characters\""
" print(filepath + \" has \" + str(len(text)) + \" characters\")"
],
"language": "python",
"metadata": {},
Expand Down
Loading

0 comments on commit b2ac0a9

Please sign in to comment.