Bag of Factors allow you to analyze a corpus from its self_factors.
Project description
Bag of Factors
Bag of Factors allows you to analyze a corpus from its factors.
- Free software: MIT
- 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.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _francois-durand/package_helper_2: https://github.com/francois-durand/package_helper_2
.. _reference: https://balouf.github.io/bof/reference/index.html
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
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 bof-0.4.1.tar.gz.
File metadata
- Download URL: bof-0.4.1.tar.gz
- Upload date:
- Size: 78.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09dbd541c7776b9e8303972dcb2010a0143b67fa6e53bc4dc16871724f7fca04
|
|
| MD5 |
4b846169c8052f3a0abcf8287e14a7dc
|
|
| BLAKE2b-256 |
1a90ecfedb19f1c92d458d5ace67898102a43946740afaeb172c18b7a2ad6d86
|
File details
Details for the file bof-0.4.1-py3-none-any.whl.
File metadata
- Download URL: bof-0.4.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa0d0de097dd050224c4cc95434bf0f7f9808ad92e38bb886282bdcb5661337
|
|
| MD5 |
20b5cc0ddf6cf89896643b8494c17597
|
|
| BLAKE2b-256 |
84c2f90eb5dba4bdab4d466d7222c00b56e4206023a139659878d9a26609c58f
|