Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add granular feature: syllables count applied to text #61

Merged
merged 6 commits into from
Nov 13, 2021

Conversation

neomatrix369
Copy link
Owner

@neomatrix369 neomatrix369 commented May 14, 2021

To be able to merge a pull request, there are a few checks:

Checklist

Please check the options that you have completed and strike-out the options that do not apply via this pull request:

  • a clear title and description to the Pull Request has been provided
  • you have read
  • the pull request passes the tests (`./test-coverage "tests slow-tests"``) - this will also be visible via the Code coverage report and CI/CD task on the Pull Request
  • you have performed some kind of smoke test by running your changes in an isolated environment i.e. Docker container, Google Colab, Kaggle, etc...
  • the notebooks are updated (see notebooks folder, read the Notebooks docs) - to be moved to release section of repo
  • CHANGELOG.md has been updated (please follow the existing format)

Goal or purpose of the PR

Added new feature(s) to the granular features groups:

  • count syllables extracted from the text provided.

Changes implemented in the PR

  • Add functionality into the granular features aspects of the library
  • Added acceptance tests to check for end-to-end flow (correctness)
    • extended input data with new variants to cover for the newly added feature(s)
    • updated expectation data files (.csv files)
  • added a short line of text to the developer guide
  • upgraded language_tool_python from 2.3.1 to 2.5.3, which fixes a failing test
  • updated the failing test expected results data file

…, which fixes the failing 'slow' test - test_apply_text_profiling.py, amended grammar issues from 21 (language_tool_python: 2.3.1) to 22 (newer version of language_tool_python: 2.5.3)
@neomatrix369 neomatrix369 added enhancement New feature or request granular feature(s) Low-level/granular feature(s) labels May 15, 2021
@neomatrix369 neomatrix369 self-assigned this May 15, 2021
@codecov
Copy link

codecov bot commented May 15, 2021

Codecov Report

Merging #61 (7a01d6f) into master (a1c112d) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 7a01d6f differs from pull request most recent head 3203597. Consider uploading reports for the commit 3203597 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master       #61   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        26    +1     
  Lines          490       498    +8     
  Branches        73        74    +1     
=========================================
+ Hits           490       498    +8     
Impacted Files Coverage Δ
nlp_profiler/constants.py 100.00% <100.00%> (ø)
nlp_profiler/granular_features/__init__.py 100.00% <100.00%> (ø)
nlp_profiler/granular_features/syllables.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 db094b9...3203597. Read the comment docs.

@sourcery-ai
Copy link

sourcery-ai bot commented May 15, 2021

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.31%.

Quality metrics Before After Change
Complexity 0.00 ⭐ 0.00 ⭐ 0.00
Method Length 108.33 🙂 111.67 🙂 3.34 👎
Working memory 5.88 ⭐ 5.94 ⭐ 0.06 👎
Quality 78.75% 78.44% -0.31% 👎
Other metrics Before After Change
Lines 131 135 4
Changed files Quality Before Quality After Quality Change
nlp_profiler/constants.py 80.50% ⭐ 80.17% ⭐ -0.33% 👎
nlp_profiler/granular_features/init.py 51.29% 🙂 50.77% 🙂 -0.52% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
nlp_profiler/granular_features/init.py apply_granular_features 0 ⭐ 114 🙂 53 ⛔ 50.77% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@neomatrix369 neomatrix369 merged commit 91f0862 into master Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request granular feature(s) Low-level/granular feature(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant