Skip to main content

No project description provided

Project description

Suggestion Helper Client

A client for interacting with Qordoba's Suggestion Helper Service (which is effectively FitBERT-as-a-service, see FitBERT).

Usage

from suggestionhelper import SuggestionHelperClient as SHC

url = "http://8.8.8.8"
client = SHC(url)

sentence = "I smash my lovely cats."
issue = {
    "from": 2,
    "until": 7,
    "suggestions": ["wash", "miss"],
}

# get all suggestions
success, suggestions, error_info = client.get_suggestions(sentence, issue)

if success:
    print(suggestions)
else:
    print(f"Call to SHS failed with error code {error_info[0]} and message {error_info[1]}")

# get the top suggestion
success, top, error_info = client.get_top_suggestion(sentence, issue)

if success:
    print(top)
else:
    print(f"Call to SHS failed with error code {error_info[0]} and message {error_info[1]}")

Installation

pip install suggestionhelper

License

Unlicensed. You can't use this, but it should be easy to build your own with FitBERT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for suggestionhelper, version 0.8.0
Filename, size File type Python version Upload date Hashes
Filename, size suggestionhelper-0.8.0.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page