feat(SemanticSearch): Added a new semantic search agent that uses fuzzy string mathcing and levenshtein distance.#103
Open
Hero2323 wants to merge 2 commits intofossology:masterfrom
Open
feat(SemanticSearch): Added a new semantic search agent that uses fuzzy string mathcing and levenshtein distance.#103Hero2323 wants to merge 2 commits intofossology:masterfrom
Hero2323 wants to merge 2 commits intofossology:masterfrom
Conversation
…. The project was not building without this update, using the same package values specified.
…zy string mathcing and levenshtein distance.
Kaushl2208
approved these changes
Oct 24, 2024
Kaushl2208
requested changes
Feb 5, 2025
Member
Kaushl2208
left a comment
There was a problem hiding this comment.
@Hero2323 , I tested the working! Found some issues :)
Also, Update the README on how to use SemanticSearch Agent. (processLicenseList flag) etc.
Please take a look.
Comment on lines
+39
to
+40
| def __init__(self, licenseList): | ||
| super().__init__(licenseList) |
Member
There was a problem hiding this comment.
Suggested change
| def __init__(self, licenseList): | |
| super().__init__(licenseList) | |
| def __init__(self, licenseList, verbose=0): | |
| super().__init__(licenseList) |
If verbose type output is planned, The input flag for verbose is defined but not passed. Prone to throw error
| fuzzy_similarity_matrix_2 = np.zeros(len(self.licenseList)) | ||
| for i in range(len(self.licenseList)): | ||
| fuzzy_similarity_matrix_2[i] = fuzz.ratio(appended_comment, self.licenseList.loc[i, 'text']) | ||
| if pd.notna(licenseList.loc[i, 'license_header']): |
Member
There was a problem hiding this comment.
Suggested change
| if pd.notna(licenseList.loc[i, 'license_header']): | |
| if pd.notna(self.licenseList.loc[i, 'license_header']): |
licenseList variable is not accessible
| args = parser.parse_args() | ||
|
|
||
| inputFile = args.inputFile | ||
| licenseList = args.processedLicenseList |
Member
There was a problem hiding this comment.
Can we also make it more reliable, If user doesnt provide processedLicenseList, Agent should pick what we already have :)
Something like:
defaultProcessed = resource_filename("atarashi",
"data/licenses/processedLicenses.csv")
if processedLicense is None:
processedLicense = defaultProcessed
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.
Added a new Semantic Search Agent that can be used as follows:
atarashi -a SemanticSearch /path/to/file.c