Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

RAKEkeywords

RAKEkeywords implements RAKE (Rapid Automatic Keyword Extraction), an algorithm that finds keywords in a document. The algorithm comes from Rose, Engel, Cramer, and Cowley (2010), "Automatic keyword extraction from individual documents", in Text Mining: Applications and Theory (John Wiley and Sons).

The package includes stopword lists for many languages, from stopwords-iso. It also registers as a keyword-extractor plugin for OVOS Plugin Manager (OPM).

Install

pip install RAKEkeywords

Usage

from RAKEkeywords import Rake

rake = Rake()

keywords = rake.extract_keywords("Mycroft is a free and open-source voice assistant for Linux-based operating systems that uses a natural language user interface")

"""
[('natural language user interface', 16.0),
 ('open-source voice assistant', 9.0),
 ('linux-based operating systems', 9.0),
 ('mycroft', 1.0),
 ('free', 1.0)]
"""

Pass a lang code to use the stopword list for another language.

from RAKEkeywords import Rake

rake = Rake(lang="pt")
keywords = rake.extract_keywords("Portugal, oficialmente República Portuguesa, é um país cujo território se situa na zona ocidental da Península Ibérica.")

Pass stop_words_path to use a custom stopword file instead of the built-in list.

from RAKEkeywords import Rake
from os.path import join, dirname

my_list = join(dirname(__file__), "stopwords", "en", "FoxStoplist.txt")
rake = Rake(stop_words_path=my_list)

Related projects

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rakekeywords-0.3.2a1.tar.gz (77.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rakekeywords-0.3.2a1-py3-none-any.whl (76.5 kB view details)

Uploaded Python 3

File details

Details for the file rakekeywords-0.3.2a1.tar.gz.

File metadata

  • Download URL: rakekeywords-0.3.2a1.tar.gz
  • Upload date:
  • Size: 77.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rakekeywords-0.3.2a1.tar.gz
Algorithm Hash digest
SHA256 877f89287ca4cfae9a037f53282b0df649852a01cc8744f3da0e7b838dc0ce33
MD5 3af9bda816783e84e50a0c40337d1a5e
BLAKE2b-256 886200b945a3b316ebc37ca584e6b390fc07c995bf9c7b6d224de44c8f7c1473

See more details on using hashes here.

File details

Details for the file rakekeywords-0.3.2a1-py3-none-any.whl.

File metadata

  • Download URL: rakekeywords-0.3.2a1-py3-none-any.whl
  • Upload date:
  • Size: 76.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rakekeywords-0.3.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a96d671cfe3c79b8dfbacf66df006bacb14795f3b3c45763d05544c396ae1b6
MD5 2a85efbab1737b02bc4e7ff734740c53
BLAKE2b-256 13c90def880f0beea8e6dc82d0add3bbe164eb094b5f1271403540aa1cd67996

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page