Skip to main content

An async client to reconcile entities against wikidata.

Project description

Wikibase Reconcile

An async client to reconcile against wikidata.

This project is inspired by reconciler. If you look for stable and mature software, I recommend using the excellent package reconciler.

Features

  • Async requests to wikidata reconiliation API
  • Makes atomic requests and is more robust when the API returns errors
  • Takes a pandas dataframe as input and also as output
  • User has rather high degree of control (but also needs more code)

Usage

from wikibase_reconcile import Client

client = Client(language="fr")

# Initialize some simple test data
characters = [
    {"type": "Q15632617", "query": "Marge Simpson"},
    {"type": "Q15632617", "query": "Homer Simpson"},
    {"type": "Q15632617", "query": "Bart Simpson"},
    {"type": "Q15632617", "query": "Lisa Simpson"},
    {"type": "Q15632617", "query": "Maggie Simpson"},
    {"type": "Q15632617", "query": "Abraham Simpson"},
    {"type": "Q15632617", "query": "Apu Nahasapeemapetilon"},
    {"type": "Q15632617", "query": "Barney Gumble"}
]

df = pd.DataFrame(characters)

# reconcile each search query against the type "Fictional Human"
results = client.reconcile(df)

# Turn results into a dataframe, keep only the top result
df_reconciled = client.results_to_pandas(results)

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

wikibase_reconcile-0.1.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

wikibase_reconcile-0.1.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file wikibase_reconcile-0.1.2.tar.gz.

File metadata

  • Download URL: wikibase_reconcile-0.1.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for wikibase_reconcile-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f0206fbb191b1008b5d418cd4eae42727ba4ffdbedc2bb7ac705087aa7f9c024
MD5 89ad13ead306765d7f92a2c3940a00a3
BLAKE2b-256 bea6e5422d4ec2ade759a11fb81f932d9f0ebc2f53a6f5db57e40923cc14eb9f

See more details on using hashes here.

File details

Details for the file wikibase_reconcile-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for wikibase_reconcile-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9b04d18638a29bbda5dea73b170df5210f67e7be8d7435ae2cd23b65d7d22a
MD5 7d297659a75e0563e322ea7658c161f8
BLAKE2b-256 53c34095f4e47b30f55b69b2148ffb1d5ebad454d5ceb9876d84a6d8755baa69

See more details on using hashes here.

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