waldyrious / entityshape

An api to compare a wikidata item with an entityschema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

entityshape

An api to compare a wikidata item with an entityschema

This api is available at http://entityshape.toolforge.org/api. The api requires 3 parameters to return a result as follows:

  1. language: e.g. en the language to return property names in
  2. entity: e.g. Q42 the wikidata entity to check
  3. entityschema: e.g. E14 the entityschema to check against

The api returns a json object containing the following:

  1. error: details of any error which may have occurred
  2. schema: the entityschema checked against
  3. name: the display name of the entityschema
  4. validity: the validity of the schema (currently unused)
  5. properties: a json object describing the validity of each property in the entity
  6. statements: a json object describing the validity of each statement in the entity

This repository also contains the source code for the user script at https://www.wikidata.org/w/User:Teester/EntityShape.js which allow use of this api on wikidata entity pages

About

An api to compare a wikidata item with an entityschema

License:GNU General Public License v3.0


Languages

Language:Python 77.8%Language:JavaScript 21.9%Language:HTML 0.2%