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
Metadata
Release files for RAKEkeywords 0.3.2a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rakekeywords-0.3.2a2.tar.gz | 77.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rakekeywords-0.3.2a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 153.9 kB
Release files / rakekeywords-0.3.2a2.tar.gz
| Download URL | rakekeywords-0.3.2a2.tar.gz |
|---|---|
| Size | 77.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac14eb72aeb0abbeefd832ca020edbe03d5e191c80409ea01cf536c97678b17a
|
|
BLAKE2b-256 checksum How to use checksums |
1a909f5343d62e9abcc0beb42ac643e371cb5a3a30fae6e2ad1b432bb7989f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / rakekeywords-0.3.2a2-py3-none-any.whl
| Download URL | rakekeywords-0.3.2a2-py3-none-any.whl |
|---|---|
| Size | 76.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66bd29caeb3a5a8cb96a9edfae23fb62d7440c3a2fc9374d47a5c61301da999e
|
|
BLAKE2b-256 checksum How to use checksums |
7970df2ba28fe6442f69ab52c5eb4a6b0a0860b34f96dcc14927ab77c8c01f7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|