Relationship types (predicates) - Colored graph

Hi, I have come from a related post.

First off, I think that a great idea to have data alongside human-readable text of blocks.

Attending your wonders

what’s the easiest way to export all graph relationships from logseq as it is today into triples (with default predicate logseq:relationship) ? => somehow graph module needs to get it’s vertices and edges? How can I export them into text file, preferably from command line, programatically?

It seems you are aware already, there is an ongoing effort from Tienson to export Logseq graph in EDN.
EDN can be convert to JSON-LD and used with Semantic Web tools.

Also, there is an ongoing effort towards deriving immutable RDF graph out of Logseq graph, discussed in the same thread, but you are well aware of that too.=)

second: wondering if would community be kind to accept extension to logseq semantics, to be able to express predicate beyond default logseq:relationship ? I dont know what would be best design choice of it (on page [[Alice]] ##likes#Apple , #likes=>Apple #[[likes][Apple]] or something else?), but some way to “color edges” , both, for mentioned earlier export (what would make it trivial to convert into RDF triples ), and potential future “edge filtering” in graph view - as currently we can filter by nodes, while I see a lot of value in potentially filtering by edges.

It already possible to express triple semantics in Logseq, via properties. example
Refs to other blocks in text do not assigned ‘predicate’ to it, that’s a fair mention.
If we do want to have it, we could formally describe that relationship in properties.

another brainstorming idea - maybe fetching properties from text block would be helpful in coloring graph?

I like this idea. Coloring is one way to represent some semantics.
E.g., coloring edges of ‘loves’ in green and of ‘hates’ in red.
More generically speaking, we could create even more specialized views for semantics.
This is akin to moldable development and concept of Semantic Web where we can build custom views of some data.
And custom views are way more handy than a generic representation. (see the above link to get a glimpse)
Graph view that we have now is generic, enriching it with more custom views sounds appealing.


Thank you for thinking in this direction, takes us one step closer to having it.=)

2 Likes