The Python package for the BlankSort keyword extraction algorithm.
Project description
BlankSort
The Python package for the BlankSort keyword extraction algorithm.
Installation
Use the following command to install from TestPyPI:
pip install --upgrade blanksort
Usage
BlankSort can be imported like any other Python package:
import blanksort
After importing, you can create a BlankSort
object.
algo = blanksort.BlankSort()
Alternatively, you can use the following code to create the BlankSort
object.
from BlankSort import *
algo = BlankSort()
The BlankSort
constructor accepts the following arguments:
binary_path
[optional]- The path to the binary folder that contains
blanksort.database
andstopwords-en.txt
. If not specified, the default binary files will be downloaded.
- The path to the binary folder that contains
preloadVectors
[optional keyword argument]- A boolean (default
False
) that specifies if word vectors should be pre-loaded into memory.
- A boolean (default
saveGeneratedVectors
[optional keyword argument]- A boolean (default
False
) that specifies if word vectors generated on-the-fly should be saved toblanksort.database
.
- A boolean (default
Example
import blanksort
algo = blanksort.BlankSort()
keywords = algo.rank("[input text]")
Binary Files
The BlankSort package requires several files, collectively referred to as "binaries".
File name | Description |
---|---|
blanksort.database |
A database file created using SQLiteDict. The database contains word vectors and n-grams imported from FastText. |
stopwords-en.txt |
A text file containing a list of stop words for pre-processing. Each line should contain a single word. |
If the files are not found in the binary_path
, the package will download the default binary folder from the latest version of binaries.zip
attached to a release.
Project details
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
Hashes for blanksort-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33272663b5747c0b7da2dd951ffcf0df3a98e67838da947aca0a17023d34b5b |
|
MD5 | a8565c46584ca1e55e5cb45cf7da2818 |
|
BLAKE2b-256 | 4b38cbe926b883a41a2f8ba21cfdcabc833b5e0f331e945949abef93d57f6924 |