pd.__version__
df.describe()
from __future__ import unicode_literals, print_function | |
import spacy | |
from spacy.attrs import ORTH, LEMMA, NORM, TAG | |
from spacy.lang.en.stop_words import STOP_WORDS | |
from spacy import displacy | |
from pathlib import Path | |
import re | |
nlp = spacy.load('en_core_web_sm') | |
# example of expanding contractions using regexes (slow for a big corpus) |
import spacy | |
class ColourExtractorStrict: | |
"""Extract colours along with adjectives""" | |
def __init__(self, colours): | |
self.colours = colours | |
self.pos_ok = ['ADJ', 'NOUN'] | |
self.tagger = spacy.load('en') |