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

Uploaded Source

Built Distributions

wikibase_reconcile-0.1-py3.8.egg (1.0 kB view details)

Uploaded Source

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wikibase_reconcile-0.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.tar.gz
Algorithm Hash digest
SHA256 d023bd959611ee1bacc41c0f982dd6b156b268d533ebdde7f98f8533ee94e197
MD5 4e83734348606f9814cc744b6dafd979
BLAKE2b-256 865aac2d2e6fb4364cfe71b941107a5532bcfad5b0cdf33c58448da6f144a315

See more details on using hashes here.

File details

Details for the file wikibase_reconcile-0.1-py3.8.egg.

File metadata

  • Download URL: wikibase_reconcile-0.1-py3.8.egg
  • Upload date:
  • Size: 1.0 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-py3.8.egg
Algorithm Hash digest
SHA256 73ea81abb53e1f910d08af9d1993e873dd58873d8cd21de94ca849e9020df288
MD5 9a8ebbe295e6aa99481ade568ce09c6c
BLAKE2b-256 1c5d3f854517d7d93e3756843a749887d1d7e538818e9631a4714ffe339222e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wikibase_reconcile-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7cf17e0ccbde4f0486a475886c0fd284c5e068436dcbde4c5184bc8dbd82af1
MD5 a13a5cdf3f348ed42b5dd723496b6779
BLAKE2b-256 7790146c0787cc3494ced7c9c712e85bd2e3603cd82e5fa10de0b36731c43260

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