Warm tip: This article is reproduced from stackoverflow.com, please click
rdf semantic-web blank-nodes

Is RDF graph lean or not lean?

发布于 2020-04-20 11:20:07

I just discovered the definition of a lean graph and I don't always know how to define it and if someone can explain to me if this graphs are lean or not .

G1 :
_:X foaf:knows ex:bob
_:X foaf:knows _:Y

I think this is lean !

G2:    
_:X foaf:knows ex:bob
_:X foaf:knows _:X

G2 isn't lean !

G3
_:X foaf:knows ex:bob

I don't know XD

G4
_:X foaf:knows _:X

And I don't know XD

Thanks in advance.

Questioner
Midoki
Viewed
47
AndyS 2020-02-06 22:44

The example at https://www.w3.org/TR/rdf11-mt/#dfn-lean

For example, the graph

ex:a ex:p _:x .
_:y ex:p _:x .

is not lean, but

ex:a ex:p _:x .
_:x ex:p _:x .

is lean. Ground graphs are lean.

In the question examples subject and object are flipped but otherwise G1 and G2 are the "RDF 1.1 Semantics" examples.

G1 is not lean.

You can remove "_:X foaf:knows _:Y" (or remove "_:y ex:p _:x") - that triple adds no new information. We know "_:X knows something" from the first triple "_:X foaf:knows ex:bob" and that is all the second triple says.

Graphs G3 and G4 are lean.

If we have G5: _:X foaf:knows _:Y then G5 is lean but G3 merge G5 is not lean.

G2 is lean because the triple "_:X foaf:knows _:X" adds the information that there is some resource that knows itself. The first triple does not say that.