Skip to main content

A package that provides wrapper functionality for the Gerbil Benchmark Service

Project description

GerbilExperimentApiWrapper

This API wrapper is meant to automate the testing of QA results with a standardized process using Gerbil for QA (see also Paper and GitHub repository).

initialization

The Gerbil object is initialized with a Gold standard dataset, a test dataset or alternatively a live annotator, as well as the used language.

As part of the initialization, the files are uploaded to the Gerbil service and an experiment is started. If upload of the experiment configuration fails or the received results page URL is not valid, then an exception is thrown and the api wrapper is not initialized.

Note: File names for the upload to the Gerbil API must not exceed 100 characters.

Examples

Running an expeiment with a local test results file:

from gerbil_api_wrapper.gerbil import Gerbil

wrapper = Gerbil(
    gold_standard_file="original_data/qald_9_plus_test_dbpedia.json",
    test_results_file="original_data/qald_9_plus_test_dbpedia-test.json",
    test_results_name="MyTestResults",
    gold_standard_name="MyGoldStandard",
    language="de"
)

Running an experiment with a live annotator:

from gerbil_api_wrapper.gerbil import Gerbil

wrapper = Gerbil(
    gold_standard_file="results_gold.json",
    live_annotator_name="QAnswer",
    live_annotator_url="http://qanswer-core1.univ-st-etienne.fr/api/gerbil",
    language="en")

After successful initialization the results can be accessed with the following functions:

  • get_results_url() returns the URL of the Gerilb website for the started experiment.
  • get_results() returns a dict containing the JSON-LD data for the started experiment.

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

gerbil-api-wrapper-1.0.3.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gerbil_api_wrapper-1.0.3-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file gerbil-api-wrapper-1.0.3.tar.gz.

File metadata

  • Download URL: gerbil-api-wrapper-1.0.3.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for gerbil-api-wrapper-1.0.3.tar.gz
Algorithm Hash digest
SHA256 045e39e1f1622796e18021e54a45c1a122fd392e12676e46a7697c61f11f63ea
MD5 7d19f8d822eb4a21c555a83229dec5da
BLAKE2b-256 596560cf48e0285c3aaa5137ec51678911a6fb2ebb6c5b732201a1fc1425812b

See more details on using hashes here.

File details

Details for the file gerbil_api_wrapper-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gerbil_api_wrapper-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b42ff9ed9e6ce7441dc345a858e7466161d2ff64880361c4aaacb2dd8e94f51c
MD5 21c5f550018aa6630c001195ca627151
BLAKE2b-256 4e37d433bda5b6496f5bf087912a8fbf04e819ed30a57d396556256b44609a0a

See more details on using hashes here.

Supported by

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