Skip to main content

A library for enriching metadata through semantic queries. It performs API calls to Wikipedia, Wikidata, DBpedia, and ORCID to retrieve and integrate structured information from multiple open knowledge sources.

Project description

A library for enriching metadata through semantic queries. It performs API calls to Wikipedia, Wikidata, DBpedia, and ORCID to retrieve and integrate structured information from multiple open knowledge sources.

Main dependencies

  • python>=3.11
  • SPARQLWrapper
  • requests

Example & Usage

from information_linking_queries.information_linking_orcid import information_linking_orcid
from information_linking_queries.information_linking_apis import information_linking

headers = {"User-Agent": "InformationBot/1.7 (https://research.org/informationbot/; informationbot@research.org) information-linking-library/1.7"}
 
orcid = information_linking_orcid(first_name="Julie", last_name="Costopoulos")
print(orcid)

info = information_linking(wikipedia_url="https://en.wikipedia.org/wiki?curid=18630637", headers=headers)
print(info)
{'orcid-id': '0000-0001-9912-3171', 'given-names': 'Julie', 'family-names': 'Costopoulos', 'credit-name': 'Julie Costopoulos', 'other-name': ['Julie S. Costopoulos', 'Julie S. Gross', 'Julie Gross'], 'email': [], 'institution-name': ['Florida Institute of Technology', 'Florida State University', 'New York University', 'University of Florida']}

{'description': 'Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. The English language draws a terminological distinction (which does not exist in every language) between translating (a written text) and interpreting (oral or signed communication between users of different languages); under this distinction, translation can begin only after the appearance of writing within a language community.', 'label': 'Translation', 'wikidata': 'https://www.wikidata.org/wiki/Q7553', 'aliases': ['translate', 'translating'], 'dbpedia': 'http://dbpedia.org/resource/Translation'}

Parameters for information_linking_orcid

  • first_name: The first name of the author. (Required)
  • last_name: The last name of the author. (Required)

Parameters for information_linking

  • wikipedia_url: The URL of a wikipedia entry (It has to be with with a curid such as 'https://en.wikipedia.org/wiki?curid=18630637'). (Required)
  • headers: A UserAgent header that complies with Wikipedia's UserAgent policy. (Required)
  • description: The first 2 sentences of a wikipedia entry, (deafult=True), (Values: True, False). (Optional)
  • label: The wikipedia title of a wikipedia entry, (deafult=True), (Values: True, False). (Optional)
  • wikidata: The wikidata url of a wikipedia entry, (deafult=True), (Values: True, False). (Optional)
  • aliases: The english wikidata aliases, (deafult=True), (Values: True, False). (Optional)
  • dbpedia: The dbpedia url of a wikipedia entry, (deafult=True), (Values: True, False). (Optional)

Licence

MIT License

Copyright (c) 2025 Nikolas Kapralos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

information_linking_queries-0.1.8.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

information_linking_queries-0.1.8-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file information_linking_queries-0.1.8.tar.gz.

File metadata

File hashes

Hashes for information_linking_queries-0.1.8.tar.gz
Algorithm Hash digest
SHA256 1b9c903ac3f00530727e0bc1ab1a2071c2b0093ea7a20b7f190b0775d507c0e1
MD5 21912ecd046418252e76ef93819b01ab
BLAKE2b-256 47397e7366a7ee7bb201aa3619f3c0eed609429bdb9af1b8d209da87e3945238

See more details on using hashes here.

File details

Details for the file information_linking_queries-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for information_linking_queries-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 66e4caf08ee393a3c8b527cda9b2373cf9c180f2fb3e4a898bf79ca12e1c0d03
MD5 b6ce2d090224341dc5a046d1894ef9a5
BLAKE2b-256 c3004370c5911663189fb1f5f84cd01990528762e051e29592e5941990fe97d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page