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

code #2

Open
elcarim opened this issue May 6, 2023 · 1 comment
Open

code #2

elcarim opened this issue May 6, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elcarim
Copy link

elcarim commented May 6, 2023

"The code is strange, especially the variable corpus which seems to have no purpose at all."

"Assigning idf to wordIDFs[word] will always result in 1 for any given word."

"The tfidf value will always be equal to tf."

"We can achieve the same results by simply taking the most frequently occurring words!"
@jessthebp jessthebp self-assigned this Jun 9, 2023
@jessthebp jessthebp added the bug Something isn't working label Jun 9, 2023
@jessthebp
Copy link
Owner

Oh, you're totally right! I mindlessly reworked some tf:idf for multi-document stuff and didn't... finish changing it for single document keyword extraction.

My original plan was to have it compare to a corpus of text in a list-- basically "your docs here" (since it's originally for SEO purposes, probably other ranking docs. But I didn't implement that and it's not reflected in the code

I'm going to update the TF IDF code to include an alternate corpus, and update the name of the tf_idf snippet to just TF. I legitimately really appreciate your callout here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants