user1848018
user1848018

Reputation: 1106

Subcategories from skos:broader, include parent category

Why in the following query, the Category:American_architecture_by_state is listed in the results?

 select distinct ?s where { ?s skos:broader category:Architecture_in_Alabama}

enter image description here

Isn't category:American_architecture_by_state, supposed to be category:Architecture_in_Alabama's parent category not subcategory?

This is really messing up my results when I use skos:broader* as I expect it to start from Parent node and traverse to child nodes.

Upvotes: 0

Views: 514

Answers (2)

Joshua Taylor
Joshua Taylor

Reputation: 85883

This is really messing up my results when I use skos:broader as I expect it to start from Parent node and traverse to child nodes.

I'm not sure what you expect that. The definition of skos:broader is given in §8 Semantic Relations in the SKOS standard:

8. Semantic Relations

The properties skos:broader and skos:narrower are used to assert a direct hierarchical link between two SKOS concepts. A triple A skos:broader B asserts that B, the object of the triple, is a broader concept than A, the subject of the triple. Similarly, a triple C skos:narrower D asserts that D, the object of the triple, is a narrower concept than C, the subject of the triple.

That means that the query

select distinct ?s where {
  ?s skos:broader category:Architecture_in_Alabama
}

should select categories that are narrower than category:Architecture_in_Alabama. Now, I'd agree that it seems like Architecture in America by State might be a supercategory of Architecture in Alabama, but it's important to note that categories aren't the same kind of things as classes. If A is a subclass of B, then everything that is an A is also B. That's not how categories work, though.

8.6.6. skos:broader and Transitivity

Note that skos:broader is not a transitive property. Similarly, skos:narrower is not a transitive property.

8.6.8. Cycles in the Hierarchical Relation (skos:broaderTransitive and Reflexivity)

In the graph below, a cycle has been stated in the hierarchical relation. Note that this graph is consistent with the SKOS data model, i.e., there is no condition requiring that skos:broaderTransitive be irreflexive.

Example 37 (consistent)
<A> skos:broader <B> .
<B> skos:broader <A> .

What it looks like might actually be the case is that the American architecture by state category is broader than most of the "Architecture in XXX" categories, and vice versa. E.g., look at the DBpedia page for American architecture by state; note that it has (just as one example) Architecture_in_New_York as a value of broader, but it also a value of broader for is skos:broader of Architecture_in_New_York. I agree that it's kind of weird, possibly undesirable, but it's not disallowed:

[For] many applications where knowledge organization systems are used, a cycle in the hierarchical relation represents a potential problem. For these applications, computing the transitive closure of skos:broaderTransitive then looking for statements of the form X skos:broaderTransitive X is a convenient strategy for finding cycles in the hierarchical relation. How an application should handle such statements is not defined in this specification and may vary between applications.

Upvotes: 1

Artemis
Artemis

Reputation: 3301

Because Category:American_architecture_by_state is both present in skis:broader and its inverse is skos:broader of. The query is working perfectly well, if you don't want Category:American_architecture_by_state in your result set, you need to rethink your query.

Upvotes: 0

Related Questions