In [1]:
from nltk.corpus import gutenberg
from nltk.tokenize import word_tokenize, sent_tokenize
In [2]:
sample_text = gutenberg.raw('bible-kjv.txt')
tokenize = sent_tokenize(sample_text)
print(tokenize[:15])
['[The King James Bible]\n\nThe Old Testament of the King James Bible\n\nThe First Book of Moses: Called Genesis\n\n\n1:1 In the beginning God created the heaven and the earth.', '1:2 And the earth was without form, and void; and darkness was upon\nthe face of the deep.', 'And the Spirit of God moved upon the face of the\nwaters.', '1:3 And God said, Let there be light: and there was light.', '1:4 And God saw the light, that it was good: and God divided the light\nfrom the darkness.', '1:5 And God called the light Day, and the darkness he called Night.', 'And the evening and the morning were the first day.', '1:6 And God said, Let there be a firmament in the midst of the waters,\nand let it divide the waters from the waters.', '1:7 And God made the firmament, and divided the waters which were\nunder the firmament from the waters which were above the firmament:\nand it was so.', '1:8 And God called the firmament Heaven.', 'And the evening and the\nmorning were the second day.', '1:9 And God said, Let the waters under the heaven be gathered together\nunto one place, and let the dry land appear: and it was so.', '1:10 And God called the dry land Earth; and the gathering together of\nthe waters called he Seas: and God saw that it was good.', '1:11 And God said, Let the earth bring forth grass, the herb yielding\nseed, and the fruit tree yielding fruit after his kind, whose seed is\nin itself, upon the earth: and it was so.', '1:12 And the earth brought forth grass, and herb yielding seed after\nhis kind, and the tree yielding fruit, whose seed was in itself, after\nhis kind: and God saw that it was good.']
Content source: prodicus/dabble
Similar notebooks: