Skip to content

feat: add SKILL_SYNONYMS dictionary and normalize parse_skills (#1116) - #1122

Open
Viidhii19 wants to merge 3 commits into
komalharshita:mainfrom
Viidhii19:feat/skill-synonym-normalization
Open

feat: add SKILL_SYNONYMS dictionary and normalize parse_skills (#1116)#1122
Viidhii19 wants to merge 3 commits into
komalharshita:mainfrom
Viidhii19:feat/skill-synonym-normalization

Conversation

@Viidhii19

Copy link
Copy Markdown

Summary [required]

This PR implements synonym normalization in the skill parsing engine to ensure that user-supplied abbreviations (e.g., "JS", "ReactJS", "Node") successfully match canonical skill entries in the projects database (e.g., "JavaScript", "React", "Node.js"). This prevents project coverage scores from dropping to 0 due to formatting and naming variations, significantly improving recommendation quality for users who use common industry abbreviations.

Related Issue [required]

Closes #1116

Type of Change [required]

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed [required]

File Change made
src/utils/recommender.py Defined the SKILL_SYNONYMS dictionary, modified parse_skills() to normalize incoming tags through the synonyms mapping, and exposed SKILL_ALIASES as a backwards-compatible alias to SKILL_SYNONYMS.
tests/test_basic.py Added 5 new test cases covering synonym parsing logic, whitespace handling, Edge cases (like Node.js), downstream scoring consistency, and dictionary validation.
CHANGELOG.md Recorded changes under Added, Changed, and Fixed categories for issue #1116.
CONTRIBUTING.md Updated hardcoded test count references from "All 27 tests" to "All tests" to ensure future-proofing.

How to Test This PR [required]

  1. Clone this branch: git checkout feat/skill-synonym-normalization
  2. Install dependencies: pip install -r requirements.txt (or verify you have python setup)
  3. Run the tests: python tests/test_basic.py

Expected test output:
32 passed, 0 failed out of 32 tests

Test Results [required]

32 passed, 0 failed out of 32 tests

Self-Review Checklist [required]

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/, fix/, docs/, data/, style/, test/
  • I have run python tests/test_basic.py and all 32 tests pass
  • I have run flake8 . locally and there are no errors
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue

Notes for Reviewer

  • Handled potential trailing spaces and casing irregularities gracefully within the synonym normalizer loop.
  • Maintained SKILL_ALIASES = SKILL_SYNONYMS internally to prevent breaking any dependent functions.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@Viidhii19 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@komalharshita komalharshita added enhancement New feature or request need review Further information is requested level:beginner quality:clean labels Jul 26, 2026
@komalharshita

Copy link
Copy Markdown
Owner

@Viidhii19

Thanks for implementing skill synonym normalization. This is a useful improvement for recommendation matching, especially for common variations such as JS/JavaScript, ReactJS/React, and Node/Node.js.

The overall scope looks appropriate, and adding dedicated test coverage is appreciated.

Before this PR can be approved, please address the following:

  1. The PR currently has merge conflicts with the latest main branch. Please sync your branch with main and resolve all conflicts carefully, especially in src/utils/recommender.py, since recommendation logic has received other recent changes.

  2. After resolving the conflicts, please verify that the synonym normalization preserves the existing behavior for skills that are not present in SKILL_SYNONYMS. Unknown/custom skills should continue to be normalized using the existing behavior rather than being dropped or incorrectly mapped.

  3. Please rerun the complete test suite after resolving the conflicts and confirm that both the existing recommendation tests and the new synonym tests pass.

Once the conflicts are resolved and the tests are passing, this should be ready for another review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement/Backend] Implement synonym normalization in recommender.py to fix missed skill matches

2 participants