Skip to main content

Find important words from a sentence.

Project description

Introduction

mask-predictor is a wrapper of BERT which can predict masked word of a sentence.

Example:

Given : I like to eat * as my dinner.

Result: [Chicken, Fish, Curry, Steak, ...]

How to run this

All you need to do is:

  1. Run pip install mask-predictor
  2. Download main.py and input.json
  3. Run main.py

The main.py is a simple example showing how to use the mask-predictor package. The main.py will read the input.json, and will produce a output file named result.json.

Note that the 1st time of running will download the spacy model file. Please re-run the code after it has successfully downloaded. The model file sized 7xxMB and expected to take fews minutes. Please keep your computer awake while downloading, otherwise it might fails.

Other files

The mask_predictor folder contains the source code of mask-predictor package, which you don't need if you install it via pip.

Others files is used for packaging the code to PyPI, which you don't need.

All you need is only main.py and input.json

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

important-words-0.0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

important_words-0.0.2-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

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