Skip to main content

Bag of Factors allow you to analyze a corpus from its self_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 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

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


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.1.tar.gz (78.6 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.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

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

Hashes for bof-0.4.1.tar.gz
Algorithm Hash digest
SHA256 09dbd541c7776b9e8303972dcb2010a0143b67fa6e53bc4dc16871724f7fca04
MD5 4b846169c8052f3a0abcf8287e14a7dc
BLAKE2b-256 1a90ecfedb19f1c92d458d5ace67898102a43946740afaeb172c18b7a2ad6d86

See more details on using hashes here.

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

Hashes for bof-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffa0d0de097dd050224c4cc95434bf0f7f9808ad92e38bb886282bdcb5661337
MD5 20b5cc0ddf6cf89896643b8494c17597
BLAKE2b-256 84c2f90eb5dba4bdab4d466d7222c00b56e4206023a139659878d9a26609c58f

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