Skip to main content

autoFillMaskWithCandidates

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.

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 autoFillMaskWithCandi==0.0.3

Examples of Usage

from autoFillMaskWithCandi 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 = [
    "maling hindi maligo",
    "maling hindi malego"
]

# 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 autoFillMaskWithCandi 0.0.3

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

Source distribution (sdist)

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

Built distribution (wheel)

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

Total release size: 9.6 kB

Release files / autoFillMaskWithCandi-0.0.3.tar.gz

Download URL autoFillMaskWithCandi-0.0.3.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
21a3415062e7f02227281aab0d37ab88bf784ec5d03c1214060c6480d9d27ac7
BLAKE2b-256 checksum
How to use checksums
e1e4912271f43bcce77f62f92a1bce72e903f52fedde4794e24eeee950807ed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / autoFillMaskWithCandi-0.0.3-py3-none-any.whl

Download URL autoFillMaskWithCandi-0.0.3-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fbcb06657581e6fbfba58190063f8bee22bd97385c95b744f2ec0efb0ac2756
BLAKE2b-256 checksum
How to use checksums
bf2bf44000e5453aa8529a7564a96b6a80c492f13e609c23b5c120579765fe48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for autoFillMaskWithCandi 0.0.3

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

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