NLTK text analysis

From XPUB & Lens-Based wiki
Revision as of 21:15, 21 October 2020 by Naaami (talk | contribs) (Replaced content with "=Natural Language Tool Kit_141020_Michael= url = "https://git.xpub.nl/XPUB/S13-Words-for-the-Future-notebooks/raw/branch/master/txt/words-for-the-future/UNDECIDABILITY.tx...")

Natural Language Tool Kit_141020_Michael

url = "https://git.xpub.nl/XPUB/S13-Words-for-the-Future-notebooks/raw/branch/master/txt/words-for-the-future/UNDECIDABILITY.txt" from urllib.request import urlopen r = urlopen(url) r rawtext = r.read() text = rawtext.decode() type(text) text = urlopen(url).read().decode() len(text) text[-1] text[0]