Fix: Preserve punctuation in tokenization to prevent skill collisions… - #1187
Open
desireddymohithreddy0925 wants to merge 12 commits into
Open
Conversation
|
Someone 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. |
Owner
|
@desireddymohithreddy0925 kindly resolve the merge conflicts asap |
Author
|
@komalharshita done mam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes issue #1169 where the ML similarity tokenization function stripped out critical punctuation from skills like "C++" and "C#". The
_tokenize()function was using a regex (r"[a-z0-9]+") that ignored symbols like+,#,., and-, causing different skills to incorrectly match as identical tokens. By updating the regex tor"[a-z0-9\+#\.-]+", meaning-bearing symbols in programming languages are now correctly preserved, resulting in accurate similarity scoring.Related Issue
Closes #1169
Type of Change
data/projects.jsonWhat Was Changed
src/utils/recommender.py_tokenize()fromr"[a-z0-9]+"tor"[a-z0-9\+#\.-]+"to preserve important symbols commonly found in programming languages.How to Test This PR
git checkout fix/issue-1169-tokenize-punctuationpip install -r requirements.txtpython app.pypython tests/test_basic.py(orpytest tests/test_basic.py)Expected test output:
Test Results
Self-Review Checklist
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
None