A keyword analyser which uses YAKE and Lingua
Project description
Keywordanalyz
This script analyzes language and keywords in a given text.
How to use
After you cloned the repository and installed the needed packages with poetry (using poetry install), you can use the script like the following:
import keywordanalyz
kw = keywordanalyz.TextAnalyser(maximum_keywords=10)
# You can also specify the length of the keywords using max_n_gram_size (defaults to 3)
text = "Global warming is a significant issue that has been a concern for many years."
print(kw.analyse(text))
# Output: {'language': 'en', 'keywords': [('Global warming', 0.015380821171891606), ('significant issue', 0.02570861714399338), ('Global', 0.09568045026443411), ('years', 0.09568045026443411), ('warming', 0.15831692877998726), ('significant', 0.15831692877998726), ('issue', 0.15831692877998726), ('concern', 0.15831692877998726)]}
# You can also set the language of the text:
print(kw.analyse(text, language="en"))
# Output is the same as before
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
keywordanalyz-0.2.0.tar.gz
(3.0 kB
view details)
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 keywordanalyz-0.2.0.tar.gz.
File metadata
- Download URL: keywordanalyz-0.2.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.5 Linux/6.15.4-1-default
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d17ab751d2e015681a3e70bc8810a6840fb7fcdfed8deb06c3a911152121065
|
|
| MD5 |
d549ab09562ccbe6bbebb8f51f6c6b3a
|
|
| BLAKE2b-256 |
050b084b9b145b008914b66f1f9744e1865848956b11834dd775b75be7f887fe
|
File details
Details for the file keywordanalyz-0.2.0-py3-none-any.whl.
File metadata
- Download URL: keywordanalyz-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.5 Linux/6.15.4-1-default
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ee2d66a346a26704e932e83eea755e1171276baf453f494db85ceaff42efa86
|
|
| MD5 |
ce76c292d0c8df1cc534979233ed9992
|
|
| BLAKE2b-256 |
e448077782c9b9620800ec299c7cc65206f1c24003ca0efc9a5b95a66a44c382
|