Rake #36
sunagparasu
started this conversation in
General
Rake
#36
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Rake: Rapid Automatic Keyword Extraction
Installation and Use
RAKE can be downloaded from the terminal using
pip install rake-nltk
To use RAKE, The python code needs to be imported into the environment. This can be achieved by
import rake
andimport operator
After the code has been imported, enter the path of your results file and apply the algorithm on the text.
filepath = "keyword_extraction.txt" rake_object = rake.Rake(filepath) text = "Feature extraction is not that complex. There are many algorithms available that can help you with feature extraction. Rapid Automatic Keyword Extraction is one of those" sample_file = open(“data/docs/fao_test/w2167e.txt”, ‘r’) text = sample_file.read() keywords = rake_object.run(text) print “Keywords:”, keywords
rake
and run the cell to obtain the result.Features
Evaluation
Result
Rake_keywords.csv
Beta Was this translation helpful? Give feedback.
All reactions