Closed MBJean closed 3 years ago
Merging #159 (2032371) into master (6850583) will increase coverage by
2.83%
. The diff coverage is78.47%
.
@@ Coverage Diff @@
## master #159 +/- ##
==========================================
+ Coverage 57.59% 60.42% +2.83%
==========================================
Files 11 12 +1
Lines 1408 1630 +222
Branches 355 434 +79
==========================================
+ Hits 811 985 +174
- Misses 543 573 +30
- Partials 54 72 +18
Impacted Files | Coverage Δ | |
---|---|---|
corpus_analysis/document.py | 84.48% <50.00%> (-0.41%) |
:arrow_down: |
gender_analysis/analysis/proximity.py | 78.63% <78.63%> (ø) |
|
gender_analysis/analysis/__init__.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6850583...2032371. Read the comment docs.
Overview
This PR introduces a new analysis module
proximity
that replaces the existinggender_adjective
module. The new module fully duplicates the functionality ofgender_adjective
with the following changes:"JJ", "JJR", "JJS"
.Notes
I've left the
gender_analysis/analysis/gender_adjective.py
module in place. This is temporary to ensure that those of us who start using the new module can compare the results and ensure all functionality is fully accounted for. I'll remove thegender_adjective
module if everything seems legit.I've introduced a few things in addition to the new module to assist the user.
GenderProximityAnalyzer.list_nltk_tags()
to retrieve a human readable list of possible NLTK tags.find_in_document_gender
,find_in_document_male
, orfind_in_document_female
fromproximity
, all of which accept a singleDocument
instance, if they don't want the full analytical capabilities of theGenderProximityAnalyzer
class.label
attribute onDocument
to provide a cleaner, readable interface for the user (i.e., they can now traverse the results of some of theGenderProximityAnalyzer
instance methods by using.get(document.label)
).Usage code
Given the following setup: