counts.update(tok.lower_ for tok in spacy_doc)
result = [
tok
for tok in extract.words(
spacy_doc,
filter_stops=False,
filter_punct=False,
After Change
def test_words_min_freq(spacy_doc):
counts = collections.Counter()
counts.update(tok.lower_ for tok in spacy_doc)
result = list(extract.words(spacy_doc, min_freq=2))
assert all(counts[tok.lower_] >= 2 for tok in result)
def test_ngrams_less_than_1(spacy_doc):