Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store: Add self reference automatically #26

Open
marcelomachado opened this issue Apr 3, 2024 · 0 comments
Open

Store: Add self reference automatically #26

marcelomachado opened this issue Apr 3, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@marcelomachado
Copy link
Member

marcelomachado commented Apr 3, 2024

For provenance purposes, it is important to know which Store each Statement refers to. This is especially interesting for cases of federated queries (filters) where the retrieved statements are retrieved from different data sources. However, the recovery of this information must be conditioned to a flag, allowing the user to choose when they want to see this data or not.

Currently it is possible to have similar behavior using extra references like this:

import kif_lib.vocabulary as wd
from kif_lib import *

kb1 = Store('sparql', 'https://query.wikidata.org/sparql')
kb1.extra_references = [ReferenceRecord(wd.stated_in('kb1'))]

kb2 = Store('sparql', kb1.iri)
kb2.extra_references = [ReferenceRecord(wd.stated_in('kb2'))]

mx = Store('mixer', [kb1, kb2])
for stmt, annots in mx.filter_annotated(wd.Brazil, limit=1):
    print(stmt)
    print()
    print(annots)

However, it should be a standardized information user-independent. User should control only when they want to access or not this data. Besides, currently there is no way to distinguish this annotation from others coming from the data source plugged in a Store. That is, suppose that exist in Wikidata a reference saying that the entity wd.Brazil is stated in (wd.stated_in) DBPedia, programmatically it would be difficult to differentiate this information from the one created by the user.

This issue is for discussing and developing this standardized way to retrieve the store provenance about statements.

@marcelomachado marcelomachado added enhancement New feature or request good first issue Good for newcomers labels Apr 3, 2024
@marcelomachado marcelomachado self-assigned this Apr 3, 2024
@gflima gflima changed the title Store: add reference to the stores from which each statement was retrieved Store: Add self reference automatically Apr 22, 2024
@gflima gflima removed the good first issue Good for newcomers label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants