Skip to main content

Fill Blank

In our early education day, while learning english one of the most important task was to fill the blanks.

Two type of question was provided:

  • Cloze test with clues
  • Cloze test without clues

It was totally difficult for non native English learner to fill the blanks. And cloze test without cloze was the most trickier.

But now a days machine can fill the blanks smartly. Mask Language Modeling(MLM) based language model give machine such power.

FillBlank is an BERT based package, can fill cloze test without clues type text. This package mostly build using huggingface transformers.

Installation

pip install fillblank

Dependency

  • pytorch 1.6+

How to Fill The Blank

from fillblank.fillblank import FillBlank
text = "what a <blank>! She <blank> to eat."
filltheblank = FillBlank()
output, output_dictionary = filltheblank.fill(text)
print(output)
print(output_dictionary['predict_words']) 
# what a <mess>! she <needed> to eat.
#['mess', 'needed']

Metadata

Release files for fillblank 1.0.1

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

Source distribution (sdist)

Source distribution for fillblank 1.0.1
File Size Uploaded
fillblank-1.0.1.tar.gz 2.2 kB Details

Built distribution (wheel)

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

Total release size: 5.7 kB

Release files / fillblank-1.0.1.tar.gz

Download URL fillblank-1.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9b73360b21a464dbf26a197d63061f77a5af30b688fbac1b140d563bae44ef41
BLAKE2b-256 checksum
How to use checksums
d1386a0e110bf6380ee70d21d5d613de0a9a301f466b6057fcddf4200c58e532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

Release files / fillblank-1.0.1-py3-none-any.whl

Download URL fillblank-1.0.1-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6ea3a78502ac7fc418cc5888df392d440cfac78d26a62879a29ce401a70a5ae
BLAKE2b-256 checksum
How to use checksums
929c89ba9555ff4471a621e4a7b53eb932cd0ad5bdb868eca22cae37affe1e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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