https://github.com/pythoncoderunicorn/nltk_bible
Using NLTK to analyze word counts, frequencies in the Bible
https://github.com/pythoncoderunicorn/nltk_bible
Last synced: 3 days ago
JSON representation
Using NLTK to analyze word counts, frequencies in the Bible
- Host: GitHub
- URL: https://github.com/pythoncoderunicorn/nltk_bible
- Owner: PythonCoderUnicorn
- Created: 2020-10-27T20:06:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-27T20:13:39.000Z (about 5 years ago)
- Last Synced: 2025-01-17T20:24:24.255Z (11 months ago)
- Language: HTML
- Size: 2.77 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NLTK_Bible
Using NLTK to analyze word counts, frequencies in the Bible
The text format of the Bible is from : ('Gutenberg Project')[http://www.gutenberg.org/ebooks/10]
the file Bible.txt is the whole book for local loading and use in case this is preferred
**Reading Local Files**
- need to use Python's built-in open() function,
followed by the read() method. Suppose you have a file document.txt,
you can load its contents like this:
f = open('document.txt')
raw = f.read()
open('document.txt', 'rU') — 'r' means to open the file for reading (the default), and 'U' stands for "Universal",
which lets us ignore the different conventions used for marking newlines.