Skip to content

Instantly share code, notes, and snippets.

@manmohan24nov
Created February 3, 2021 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manmohan24nov/d7540c6f1705fba3d104e0fedb0d889b to your computer and use it in GitHub Desktop.
Save manmohan24nov/d7540c6f1705fba3d104e0fedb0d889b to your computer and use it in GitHub Desktop.
>>> from rake_nltk import Rake
>>> rake_nltk_var = Rake()
>>> text = """spaCy is an open-source software library for advanced natural language processing,
written in the programming languages Python and Cython. The library is published under the MIT license
and its main developers are Matthew Honnibal and Ines Montani, the founders of the software company Explosion."""
>>> rake_nltk_var.extract_keywords_from_text(text)
>>> keyword_extracted = rake_nltk_var.get_ranked_phrases()
>>> print(keyword_extracted)
['advanced natural language processing', 'software company explosion',
'programming languages python', 'source software library', 'mit license',
'matthew honnibal', 'main developers', 'ines montani', 'library', 'written',
'spacy', 'published', 'open', 'founders', 'cython']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment