Skip to main content

Bag of Factors allows you to analyze a corpus from its factors.

Project description

Bag of Factors

PyPI Status Build Status Documentation Status License: MIT Code Coverage

Bag of Factors allows you to analyze a corpus from its factors.

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

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.

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

bof-0.4.2.tar.gz (84.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bof-0.4.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file bof-0.4.2.tar.gz.

File metadata

  • Download URL: bof-0.4.2.tar.gz
  • Upload date:
  • Size: 84.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.15

File hashes

Hashes for bof-0.4.2.tar.gz
Algorithm Hash digest
SHA256 60a54a952e026332528f66860e5721d863d02ef0b92c09f6ea0ad1a23f99aee2
MD5 72bcbe9c2340e1493d453f27a45c7c68
BLAKE2b-256 84178c17f0cd32834b9ea8d97c780279f68f829569af11c5c0972ab97db86503

See more details on using hashes here.

File details

Details for the file bof-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: bof-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.15

File hashes

Hashes for bof-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21852dfa9ccf9e247122d107dd29e1ce5809ae68dd8785fb9a9aaa2aa9834060
MD5 d3fa5f338de9b666909775c0091fc31d
BLAKE2b-256 07daa7694717d241602f0998d3ae473d9a80104e6c6bac3fe6042e42805ef039

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page