The way skos:broader is being used in our case is a tree like structure
with some having multiple parents that can be broader but will point back
to the same main broad concept which branches out to its children,
grandchildren, etc. I need the shortest path from whichever instance is
selected to all of its descendants. All will have the connection to each
other through the skos:broader within the family tree (some can have more
than 1 direct skos:broader concept (parent)).

Do you have any example documentation on how those functions can be
utilized?

On Sat, Feb 17, 2024 at 2:44 AM Holger Knublauch <hol...@topquadrant.com>
wrote:

> Hi Marie,
>
> we do have some built-in functions including spif:shortestObjectsPath and
> swa:shortestPathsBetweenNodes that may help.
>
> To clarify your requirements, is it true that one of the nodes is always
> an (indirect) parent of the other node, or does the algorithm also need to
> walk in one direction and then in another direction of the tree structure?
>
> And are we talking about tree structures at all, or arbitrary graphs?
>
> Holger
>
>
> On 16 Feb 2024, at 10:48 pm, Marie Valadez <mevalade...@gmail.com> wrote:
>
> I have searched and tested out multiple ways to get the distance between
> two nodes. I want a query that will show the child concepts and how far
> away they are from the current concept so that I can create a table on a
> form showcasing this.
>
> The following query works if a ?sub concept does not have two connection
> through skos:broader. But once a ?sub has two parent concepts with the
> skos:broader it overcounts. I have included a basic example diagram on the
> issue I am dealing with. Any ideas on how to get an accurate count?
>
> SELECT ?sub  (count(distinct ?mid) as ?distance)
> WHERE {
>   $this ^skos:broader* ?mid .
>   ?mid ^skos:broader+ ?sub .
> }
> group by $this ?sub
>
>
>
>
>
>
> --
> The topics of this mailing list include TopBraid EDG and related
> technologies such as SHACL.
> To post to this group, send email to topbraid-users@googlegroups.com
> ---
> You received this message because you are subscribed to the Google Groups
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to topbraid-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/be2ebc41-1fa7-4a70-a3ca-d8ee2cf575ddn%40googlegroups.com
> <https://groups.google.com/d/msgid/topbraid-users/be2ebc41-1fa7-4a70-a3ca-d8ee2cf575ddn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> <stepcount-Page-2.drawio.png>
>
>
> --
> The topics of this mailing list include TopBraid EDG and related
> technologies such as SHACL.
> To post to this group, send email to topbraid-users@googlegroups.com
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "TopBraid Suite Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/topbraid-users/CUgBING_53U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> topbraid-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/topbraid-users/D618E05A-6068-428F-B8DA-77C9D6C52A96%40topquadrant.com
> <https://groups.google.com/d/msgid/topbraid-users/D618E05A-6068-428F-B8DA-77C9D6C52A96%40topquadrant.com?utm_medium=email&utm_source=footer>
> .
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/CAH4XeR92ty0CU3k55_fYc%3DA_Vmjxy64b8vTcDKDU3uBUx9KjQA%40mail.gmail.com.

Reply via email to