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.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wikibase_reconcile-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 07f0a4dcb04e1d2d7784815d36ac65fd7024ba55a7f17ba6bb8f2b8b21194282
MD5 a2c4f35583058e6c5d4eb75666c26773
BLAKE2b-256 90e6436fff6456973773510cf7a3edcb31431a4f772238835d6b7c3fa8fdd465

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wikibase_reconcile-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99619e2298111e1ec8fd8b3b640ddff3966b050386abab80c7c26a50a85d269d
MD5 b2a5775554ad5d0b1fb4d7c4f6cb4242
BLAKE2b-256 006e7c146da21992a6b6827a024d9c903b1f45f0f064bf41ab06bdc89befd092

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