Skip to main content

autoFillMaskWithCandy

Under construction! Not ready for use yet! Currently experimenting and planning!

Developed by Elatot (c) 2024

PyTorch and Transformers

This Python package provides advanced text processing functionalities utilizing PyTorch and Hugging Face's Transformers library. It includes capabilities for setting up a tokenizer and model from Hugging Face, automatically masking differing words in sentences, calculating the probability of candidate words, and more.

Features

  • Initialize tokenizer and model from Hugging Face's Transformer library.
  • Automatically mask differing words in a set of input sentences.
  • Calculate the probability of a candidate word.
  • Show masked inputs and provide scores for candidate words.
  • Replace masked words with the most probable candidates.

Limitations

  • May not be compatible with model using

Installation

  • To use this package, you need to have Python installed on your system, along with PyTorch and the Transformers library. If you haven't installed these dependencies yet, you can do so using pip:
pip install torch transformers
pip install autoFillMaskWithCandy==0.0.4

Examples of Usage

from autoFillMaskWithCandy import setTokenModel, show_mask_fill, mask_fill_replaced

# Set the model for tokenizer
model_name = "Your-Model-Name-Here"
setTokenModel(model_name)

# Example sentences
input_sentences = [
    "Pasensya heto lng ako, bobo sa pagaral",
    "Pasensya hito lng ako, bobo sa pagaral",
    "Pasensya heto lng ako, bubo sa pagaral",
    "Pasensya hito lng ako, bubo sa pagaral"
]

# Show masked input and scores for candidate words
show_mask_fill(input_sentences)

# Print the sentence with masked words replaced
print(mask_fill_replaced(input_sentences))
  • Replace "Your-Model-Name-Here" with the model name you want to use from Hugging Face.

Metadata

Release files for autoFillMaskWithCandy 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autoFillMaskWithCandy 0.0.4
File Size Uploaded Provenance
autoFillMaskWithCandy-0.0.4.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for autoFillMaskWithCandy 0.0.4
File Interpreter ABI Platform
autoFillMaskWithCandy-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / autoFillMaskWithCandy-0.0.4.tar.gz

Download URL autoFillMaskWithCandy-0.0.4.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e0e05e48278815e3ec4e551dcabb271c39bd60cc86e4484c3c46da7bbb948137
BLAKE2b-256 checksum
How to use checksums
2fc5efb787ef29216a97a7663a93cf6a7f4430c847cddf5170f945f0bc6e4231
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / autoFillMaskWithCandy-0.0.4-py3-none-any.whl

Download URL autoFillMaskWithCandy-0.0.4-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f603766bef9dc4d414d0bf343295c23c7c95743d7e45141f9853edce21a9e110
BLAKE2b-256 checksum
How to use checksums
62bc6c37a22c3e8dc09d584ef3e1dbd53bb41b9801d0dd8ff6b2cb37801c575c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for autoFillMaskWithCandy 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page