Skip to main content

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.

Release files for gerbil-api-wrapper 1.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 gerbil-api-wrapper 1.0.3
File Size Uploaded
gerbil-api-wrapper-1.0.3.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gerbil-api-wrapper 1.0.3
File Interpreter ABI Platform
gerbil_api_wrapper-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / gerbil-api-wrapper-1.0.3.tar.gz

Download URL gerbil-api-wrapper-1.0.3.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
045e39e1f1622796e18021e54a45c1a122fd392e12676e46a7697c61f11f63ea
BLAKE2b-256 checksum
How to use checksums
596560cf48e0285c3aaa5137ec51678911a6fb2ebb6c5b732201a1fc1425812b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / gerbil_api_wrapper-1.0.3-py3-none-any.whl

Download URL gerbil_api_wrapper-1.0.3-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b42ff9ed9e6ce7441dc345a858e7466161d2ff64880361c4aaacb2dd8e94f51c
BLAKE2b-256 checksum
How to use checksums
4e37d433bda5b6496f5bf087912a8fbf04e819ed30a57d396556256b44609a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.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