chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.21k stars 249 forks source link

Fix most_discriminating_terms in keyterms #189

Closed SandyRogers closed 6 years ago

SandyRogers commented 6 years ago

Description

keyterms.most_discriminating_terms was broken, beause of changes introduced to vsm.Vectorizer and get_doc_freqs (introduced in #167 )

Motivation and Context

I didn't make an issue for this, because it seemed like a straight forward fix.

How Has This Been Tested?

A unit test was added to test_keyterms.py, because there was previously no coverage for the most_discriminating_terms method. This was tested using pytest as standard: pytest tests/test_keyterms.py -v.

Types of changes

Checklist:

bdewilde commented 6 years ago

Thanks, @SandyRogers ! This looks great — I especially appreciate the Thomas Friedman unit test. 😂