Skip to content

feat(analyzing): add functionWordCount and contentWordCount with tests - #80

Merged
Samarth2190 merged 7 commits into
Samarth2190:mainfrom
satyasrisundarapalli:feature/content-words
Sep 21, 2025
Merged

feat(analyzing): add functionWordCount and contentWordCount with tests#80
Samarth2190 merged 7 commits into
Samarth2190:mainfrom
satyasrisundarapalli:feature/content-words

Conversation

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor

✨ Summary

This PR introduces new utilities to analyze function words and content words in text.

✅ Changes

Added functionWordCount in src/analyzing/functionWordCount.ts

Added contentWordCount in src/analyzing/contentWordCount.ts

Added unit tests for both utilities in src/tests/analyzing/

🧪 Testing

Verified that function words (e.g., the, is, of) are counted correctly.

Verified that content words (e.g., elephants, run, fast) are counted correctly.

Added test cases for empty strings, punctuation handling, and case insensitivity.

🔗 Related Issue

Resolves: Function words vs content words

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

@Samarth2190 Hi 👋,
This PR is ready for your review. It adds functionWordCount and contentWordCount along with basic tests ✅.
Please let me know if you’d like any changes. Thanks! 🙌

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

@Samarth2190 Sir, I’ve updated the tests to use Node’s test runner and removed the Jest config. All tests are passing now ✅.

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 Sir, just checking in. Please let me know if there’s anything I should improve or adjust in this PR.

@Samarth2190

Copy link
Copy Markdown
Owner

@satyasrisundarapalli Please make the necessary changes to README file too

@satyasrisundarapalli

satyasrisundarapalli commented Aug 29, 2025

Copy link
Copy Markdown
Contributor Author

@Samarth2190 Hi Sir👋, I’ve updated the README.md with the details for contentWordCount and functionWordCount. Please let me know if any further changes are needed 🙂

@Samarth2190

Copy link
Copy Markdown
Owner

@satyasrisundarapalli

  1. In the READMDE.md there are no one-line descriptions for the two functions against their anchor tags.
  2. The function descriptions do not follow the standard format given in the README file. There are several inconsistencies like no proper tables and good examples demonstrating the funciton's use.
  3. There are changes being made to package.json which are not necessary. Stringzy is added there as a dependency.

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

@satyasrisundarapalli

  1. In the READMDE.md there are no one-line descriptions for the two functions against their anchor tags.
  2. The function descriptions do not follow the standard format given in the README file. There are several inconsistencies like no proper tables and good examples demonstrating the funciton's use.
  3. There are changes being made to package.json which are not necessary. Stringzy is added there as a dependency.

@Samarth2190 Ok sir,I will work on it.

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 Sir! I’ve updated the README file to follow the standard format, added proper examples, and improved the return sections for contentWordCount and functionWordCount.

I also cleaned up the package.json by removing unnecessary dependencies.

Thanks for guiding me through this! Looking forward to your review!

@satyasrisundarapalli

satyasrisundarapalli commented Aug 31, 2025

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 Sir !
I've made the changes you suggested and resolved the conflicts.
Whenver you get a chance ,I'd be grateful if you could take a look.Thanks a lot for guiding me through this!

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 Sir👋, just wanted to kindly follow up on this PR. Please let me know if you’d like me to make any changes or improvements before it can be merged. Thanks a lot for your time and review!

@satyasrisundarapalli

satyasrisundarapalli commented Sep 5, 2025

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 👋,
Just a gentle reminder regarding this PR. Could you please review it and let me know if any modifications are required? Also, if possible, kindly add the GSSoC'25 and Level labels so that it can be counted under the program. Thanks a lot for your time and guidance!

@Samarth2190 Samarth2190 added gssoc25 GSSOC'25 approved issue Level 2 Medium Level issue labels Sep 9, 2025
@Samarth2190

Copy link
Copy Markdown
Owner

Hi @satyasrisundarapalli , there are some minor inconsistencies in the README file. The format is not the same as other utility definitions in the file. Also there is some changes made in the pacakage.json and package-lock.json.
These 2 are the only fixes you need to make.

Looking forward to merging your PR!

@satyasrisundarapalli

satyasrisundarapalli commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

Hi @satyasrisundarapalli , there are some minor inconsistencies in the README file. The format is not the same as other utility definitions in the file. Also there is some changes made in the pacakage.json and package-lock.json. These 2 are the only fixes you need to make.

Looking forward to merging your PR!

@Samarth2190 Ok sir, I will fix those issues.

@satyasrisundarapalli

Copy link
Copy Markdown
Contributor Author

Hi @Samarth2190 Sir !
I've made the changes you suggested and resolved the conflicts.
Whenver you get a chance ,I'd be grateful if you could take a look.Thanks for your guidance and support.

@Samarth2190
Samarth2190 merged commit 4340d1b into Samarth2190:main Sep 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc25 GSSOC'25 approved issue Level 2 Medium Level issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants