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 mimics 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 mimics
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 mimics 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 changed 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 package_helper_2 project template.
Metadata
Release files for bof 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bof-0.4.2.tar.gz | 84.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bof-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.8 kB
Release files / bof-0.4.2.tar.gz
| Download URL | bof-0.4.2.tar.gz |
|---|---|
| Size | 84.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60a54a952e026332528f66860e5721d863d02ef0b92c09f6ea0ad1a23f99aee2
|
|
BLAKE2b-256 checksum How to use checksums |
84178c17f0cd32834b9ea8d97c780279f68f829569af11c5c0972ab97db86503
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.15
|
Release files / bof-0.4.2-py3-none-any.whl
| Download URL | bof-0.4.2-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21852dfa9ccf9e247122d107dd29e1ce5809ae68dd8785fb9a9aaa2aa9834060
|
|
BLAKE2b-256 checksum How to use checksums |
07daa7694717d241602f0998d3ae473d9a80104e6c6bac3fe6042e42805ef039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.7.15
|