Bag of Factors allow you to analyze a corpus from its self_factors.
Project description
Bag of Factors allow you to analyze a corpus from its factors.
Free software: GNU General Public License v3
Documentation: https://balouf.github.io/bof/.
Features
Feature Extraction
The feature_extraction module mimicks the module https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text with a focus on character-based extraction.
The main differences are:
it is slightly faster;
the features can be incrementally updated;
it is possible to fit only a random sample of factors to reduce space and computation time.
The main entry point for this module is the CountVectorizer class, which mimicks its scikit-learn counterpart (also named CountVectorizer). It is in fact very similar to sklearn’s CountVectorizer using char or char_wb analyzer option from that module.
Fuzz
The fuzz module mimicks the fuzzywuzzy-like packages like
fuzzywuzzy (https://github.com/seatgeek/fuzzywuzzy)
rapidfuzz (https://github.com/maxbachmann/rapidfuzz)
The main difference is that the Levenshtein distance is replaced by the Joint Complexity distance. The API is also slightly change to enable new features:
The list of possible choices can be pre-trained (fit) to accelerate the computation in the case a stream of queries is sent against the same list of choices.
Instead of one single query, a list of queries can be used. Computations will be parallelized.
The main fuzz entry point is the Process class.
Getting Started
Look at examples from the reference section.
Credits
This package was created with Cookiecutter and the francois-durand/package_helper_2 project template.
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
Built Distribution
File details
Details for the file bof-0.4.0.tar.gz
.
File metadata
- Download URL: bof-0.4.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d7e48cd1624cec854f7f9172725d19ebdb2a95834af06ce3609f13f098d18bf |
|
MD5 | cf6281da6455b8d74ce5e1182e631f24 |
|
BLAKE2b-256 | f3d05ff8db7455ff4389f6620f12b9df54c8b22f53d9e3a451ddb065c04e7b2e |
File details
Details for the file bof-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: bof-0.4.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce895b1763a7ca5745105e332e562541421379e8d0f2fe511d142c09511879c7 |
|
MD5 | d12a7e350f81ab62743dd6e6c12475c0 |
|
BLAKE2b-256 | 0943cbac8252024e2296c0cae1ec4cd0173e221392f08379650782d0ceb0c449 |