BALaka-18 / rake_new2

A Python library that enables smooth keyword extraction from any text using the RAKE(Rapid Automatic Keyword Extraction) algorithm.
MIT License
29 stars 20 forks source link

Comparison against TF-IDF Vectorizer (from scratch) #8 #20

Closed 2bit-hack closed 3 years ago

2bit-hack commented 3 years ago

Description of the change

Related Issues & Documents (if needed)

Issue #8

What type of PR is this? (check all applicable)

QA Instructions(if necessary), Screenshots of Output or Recordings

cd into tests and run tfidf_scratch_vs_rake.py

Added tests?

Added to documentation / readme or updated requirements.txt(if needed)?

2bit-hack commented 3 years ago

Should I incorporate Restyled's changes locally and make another PR?

2bit-hack commented 3 years ago

Looks like Restyled automatically merged the changes into this PR

2bit-hack commented 3 years ago

Okay, problem Restyled reordered some of the imports so my fix of appending .. to the path isn't working

Right now, python can't get rake and tfidf imports from tests, because it can't import from a package above it My fix makes the path search from ..tests, that is, the root path, where it can find the imports If Restyled changes the order of imports, the line that appends the .. happens after the imports and thus the imports fail

BALaka-18 commented 3 years ago

Okay, problem Restyled reordered some of the imports so my fix of appending .. to the path isn't working

Right now, python can't get rake and tfidf imports from tests, because it can't import from a package above it My fix makes the path search from ..tests, that is, the root path, where it can find the imports If Restyled changes the order of imports, the line that appends the .. happens after the imports and thus the imports fail

But it shows all checks have passed. I don't think there's a problem :)

2bit-hack commented 3 years ago

Try running the code and seeing if it works. If it works, that's great. On my system, I only managed to get this file working after that hacky fix of appending .., but I suppose it'll vary from system to system depending on how the Python path is set.

2bit-hack commented 3 years ago

Does it import the rake and tfidf modules without any problem?

BALaka-18 commented 3 years ago

Does it import the rake and tfidf modules without any problem?

Yes. Make the small changes and it'll be good to merge. Also, squash all commits into a single commit after all commits have been made.

BALaka-18 commented 3 years ago

@2bit-hack it still shows 12 commits.

2bit-hack commented 3 years ago

I'm not quite sure how to squash commits. I ran git rebase with the last 12 commits or so and squashed them into one commit but it seems like the older commits haven't been removed.

BALaka-18 commented 3 years ago

Okay not a problem I'll squash and merge for now. But you might want to check this video out : https://www.youtube.com/watch?v=2E23I9PzplM