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
- OpenVoiceOS/ovos-plugin-manager: the plugin framework this package registers with under the
opm.keywordsentry point. - stopwords-iso/stopwords-iso: the multi-language stopword lists bundled with this package.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
877f89287ca4cfae9a037f53282b0df649852a01cc8744f3da0e7b838dc0ce33
|
|
| MD5 |
3af9bda816783e84e50a0c40337d1a5e
|
|
| BLAKE2b-256 |
886200b945a3b316ebc37ca584e6b390fc07c995bf9c7b6d224de44c8f7c1473
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a96d671cfe3c79b8dfbacf66df006bacb14795f3b3c45763d05544c396ae1b6
|
|
| MD5 |
2a85efbab1737b02bc4e7ff734740c53
|
|
| BLAKE2b-256 |
13c90def880f0beea8e6dc82d0add3bbe164eb094b5f1271403540aa1cd67996
|