Skip to content

Instantly share code, notes, and snippets.

View kspicer80's full-sized avatar

Kevin Andrew Spicer kspicer80

View GitHub Profile
date metric_tons
1870 13
1871 12.9
1872 15.4
1873 17
1874 16.4
1875 16.5
1876 16.6
1877 16.3
1878 16.4
@kspicer80
kspicer80 / verbsKerouac.py
Created December 24, 2019 17:40
Messing around with spaCy and Kerouac
import matplotlib.pyplot as plt
import spacy
nlp = spacy.load('en_core_web_lg')
import pandas as pd
from collections import Counter
kerouac_raw = open('kerouac.txt').read()
kerouac = nlp(kerouac_raw)
Counter([w.string.strip() for w in kerouac.ents if w.label_ == 'PERSON']).most_common(10)