Pular para o conteúdo principal

RDF e Reificação

Reification is mechanism for adding properties to RDF graph edges, thus making them directly translatable to property graphs. Reification: break down any structured data into triples, without loss of information. N-ary relations

Reificação em RDF para suportar atributos nas arestas como por exemplo dados de proveniência. Uso de nós brancos. Reificação: incluir outras propriedades para a tripla

rdf:Statement
rdf:subject
rdf:predicate
rdf:object

Reificação também se aplica a LPG para relações n-árias assim como em RDF. Reduzir relacionamentos n-ários a n relacionamentos binários (coleção, reificação).

The RDF* and SPARQL* Approach to Annotate Statements in RDF: Although this is possible, up to now there has not been one standard, agreed upon way to do this. RDF* is a proposal on how to do this, introduced in 2014, which is getting traction in the RDF world.

Relação ternária
============

Professor X ministra a disciplina Y para a turma Z

1 X - é um -> Professor
2 Y - é um -> Disciplina
3 Z - é uma -> Turma
4 X - ministra -> Y
5 Y - é ministrada para -> Z

Id    node1        label                        node2
1     X                é um                        Professor
2     Y                é um                        Disciplina
3     Z                é uma                        Turma
4     X                ministra                    Y
5     Y                é ministrada para        Z

1 X - é um -> Professor
2 Z - é uma -> Turma
3 Y - é um -> Disciplina
4 X - ministra -> Y - para -> Z

Id    node1        label                node2
1     X            é um                Professor
2     Z            é uma                Turma
3     Y            é um                Disciplina
4     X            ministra            Y
5    4            para                Z

Id    node1        label                node2
1     X            é um                Professor
2     Z            é uma                Turma
3     Y            é um                Disciplina
4     ST            é um                RDF Statement
5     ST            sujeito            X
6    ST            objeto            Y
7    ST            predicado         ministra
8    ST            para                Z

Standard Reification

Welles  name       "Orson Welles" .
 Welles  mentioned  Kubrick .
 Kubrick  name    "Stanley Kubrick" .
 Kubrick  influencedBy  Welles .
s significance 0.8 .
s rdf:type rdf:Statement .
s rdf:subject Kubrick .
s rdf:predicate influencedBy .
s rdf:object Welles .

Single-Triple Named Graphs

g1 { Kubrick influencedBy Welles }
g1 significance 0.8 .

Singleton Properties

Kubrick influencedBy Welles .
Kubrick p1 Welles .
p1 singletonPropertyOf influencedBy .
p1 significance 0.8 .

Fonte: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4350149/

KGTK

kgtk unreify-rdf-statements -i graph-reification.tsv -o graph-unreification-statement.tsv -v

Opening the input file: graph-reification.tsv
KgtkReader: File_path.suffix: .tsv
KgtkReader: reading file graph-reification.tsv
header: node1   label   node2   id
input format: kgtk
KgtkReader: Special columns: node1=0 label=1 node2=2 id=3
KgtkReader: Reading an edge file.
Opening the output file: graph-unreification-statement.tsv
File_path.suffix: .tsv
KgtkWriter: writing file graph-unreification-statement.tsv
header: node1   label   node2   id
Reading and grouping the input records.
Processing the input records.
Processed 15 records in 5 groups.
Unreified 1 groups.
Wrote 12 output records

Entrada

node1    label    node2    id
Welles    name    "Orson Welles"    E1
Welles    mentioned    Kubrick    E2
Kubrick    name    "Stanley Kubrick"    E3
Kubrick    influencedBy    Welles    E4
s    significance    0.8    E5
s    rdf:type    rdf:Statement    E6
s    rdf:subject    Kubrick    E7
s    rdf:predicate    influencedBy    E8
s    rdf:object    Welles    E9

Kubrick    influencedBy    Welles    G1
G1    significance    0.8    E10
Kubrick    influencedBy    Welles    E11
Kubrick    p1    Welles    E12
p1    singletonPropertyOf    influencedBy    E13
p1    significance    0.8    E14

Saída

node1    label    node2    id
G1    significance    0.8    E10
Kubrick    name    "Stanley Kubrick"    E3
Kubrick    influencedBy    Welles    E4
Kubrick    influencedBy    Welles    G1
Kubrick    influencedBy    Welles    E11
Kubrick    p1    Welles    E12
Welles    name    "Orson Welles"    E1
Welles    mentioned    Kubrick    E2
p1    singletonPropertyOf    influencedBy    E13
p1    significance    0.8    E14
Kubrick    influencedBy    Welles    s
s    significance    0.8    s-1

Não consegui usar o unreify values pq não entendi bem que tipo de reificação é essa

unreify-values -i graph-reification.tsv -o graph-unreification-values.tsv ....

Reificação da Wikidata para representação em RDF
=====================================

Na International Semantic Web Conference (ISWC) de 2015 um artigo comparativo com 4 abordagens de reificação dos dados da Wikidata

  • standard reification (sr) whereby an RDF resource is used to denote the triple itself, denoting its subject, predicate and object as attributes and allowing additional meta-information to be added.
  • n-ary relations (nr) whereby an intermediate resource is used to denote the relationship, allowing it to be annotated with meta-information.
  • singleton properties (sp) whereby a predicate unique to the statement is created, which can be linked to the high-level predicate indicating the relationship, and onto which can be added additional meta-information.
  • Named Graphs (ng) whereby triples (or sets thereof) can be identified in a fourth field using, e.g., an IRI, onto which meta-information is added

e em cinco Graph Databases: 4store, BlazeGraph, GraphDB, Jena TDB, Virtuoso.

Hernández, D., A. Hogan and M. Krötzsch. “Reifying RDF: What Works Well With Wikidata?” SSWS@ISWC (2015).


Comentários

Postagens mais visitadas deste blog

Connected Papers: Uma abordagem alternativa para revisão da literatura

Durante um projeto de pesquisa podemos encontrar um artigo que nos identificamos em termos de problema de pesquisa e também de solução. Então surge a vontade de saber como essa área de pesquisa se desenvolveu até chegar a esse ponto ou quais desdobramentos ocorreram a partir dessa solução proposta para identificar o estado da arte nesse tema. Podemos seguir duas abordagens:  realizar uma revisão sistemática usando palavras chaves que melhor caracterizam o tema em bibliotecas digitais de referência para encontrar artigos relacionados ou realizar snowballing ancorado nesse artigo que identificamos previamente, explorando os artigos citados (backward) ou os artigos que o citam (forward)  Mas a ferramenta Connected Papers propõe uma abordagem alternativa para essa busca. O problema inicial é dado um artigo de interesse, precisamos encontrar outros artigos relacionados de "certa forma". Find different methods and approaches to the same subject Track down the state of the art rese...

Knowledge Graph Embedding with Triple Context - Leitura de Abstract

  Jun Shi, Huan Gao, Guilin Qi, and Zhangquan Zhou. 2017. Knowledge Graph Embedding with Triple Context. In Proceedings of the 2017 ACM on Conference on Information and Knowledge Management (CIKM '17). Association for Computing Machinery, New York, NY, USA, 2299–2302. https://doi.org/10.1145/3132847.3133119 ABSTRACT Knowledge graph embedding, which aims to represent entities and relations in vector spaces, has shown outstanding performance on a few knowledge graph completion tasks. Most existing methods are based on the assumption that a knowledge graph is a set of separate triples, ignoring rich graph features, i.e., structural information in the graph. In this paper, we take advantages of structures in knowledge graphs, especially local structures around a triple, which we refer to as triple context. We then propose a Triple-Context-based knowledge Embedding model (TCE). For each triple, two kinds of structure information are considered as its context in the graph; one is the out...

KnOD 2021

Beyond Facts: Online Discourse and Knowledge Graphs A preface to the proceedings of the 1st International Workshop on Knowledge Graphs for Online Discourse Analysis (KnOD 2021, co-located with TheWebConf’21) https://ceur-ws.org/Vol-2877/preface.pdf https://knod2021.wordpress.com/   ABSTRACT Expressing opinions and interacting with others on the Web has led to the production of an abundance of online discourse data, such as claims and viewpoints on controversial topics, their sources and contexts . This data constitutes a valuable source of insights for studies into misinformation spread, bias reinforcement, echo chambers or political agenda setting. While knowledge graphs promise to provide the key to a Web of structured information, they are mainly focused on facts without keeping track of the diversity, connection or temporal evolution of online discourse data. As opposed to facts, claims are inherently more complex. Their interpretation strongly depends on the context and a vari...