Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linked-data example #5

Open
cristianvasquez opened this issue Jan 27, 2023 · 7 comments
Open

linked-data example #5

cristianvasquez opened this issue Jan 27, 2023 · 7 comments

Comments

@cristianvasquez
Copy link

Hi! I'm happy about Logseq producing Linked data.

I'd like to know what the RDF looks like. Could I see an example?

I'm an Obsidian User, and I'm producing RDF from notes as well here: https://github.com/cristianvasquez/vault-triplifier

Perhaps they are similar models?

@logseq-cldwalker
Copy link
Collaborator

logseq-cldwalker commented Jan 28, 2023

Hi! Cool project. It reminds me I need to add schema:name to the real-world script

I'd like to know what the RDF looks like. Could I see an example?

Sure. docs.ttl.txt. You can also create this output with the example instructions. You don't need to have logseq installed

There are some similarities and differences between your example and this example script:

  • Looks like we can both create rdf triples at a page level and on parts of a page. Your note is what we'd call a block in logseq but block is more granular. Looks like you also have natural language properties within a note with is a :: which we don't have yet.
  • We reference the property urls differently. It looks like you're referencing them directly in the notes and shortening them with script prefixes. For my example with the docs graph, I alias that information once in the property's page e.g. https://docs.logseq.com/#/page/description . Click on url to see other properties that have the same structure. I did it this way to encode all the information in the graph/vault and try to make it user friendly.
  • I think your example uses a custom parser. My example is using logseq's parser so any concepts I rely on like properties are also supported within the app
  • One thing that may be interesting from the docs graph, is that every class, property or class instance is a page in the graph, which allows for the user to reference and navigate with them easily. Respective examples are in the linked refs of https://docs.logseq.com/#/page/Class, https://docs.logseq.com/#/page/Property and https://docs.logseq.com/#/page/Feature

@logseq-cldwalker
Copy link
Collaborator

Closing as I've answered. Happy to reopen if you want to chat more about this

@cristianvasquez
Copy link
Author

Sure, I still need to find the time to analyze the links you posted adequately.

Regarding the production of RDF, a series of use cases could help shed some light.

Simple things, such as:

  • Bob publishes note A on the Web using Obsidian, and Charlie publishes note B using Logseq. Notes A and B can be dereferenced in HTML, RDF, Markdown, etc.
  • Note A includes links to B and vice-versa
  • Bob and Charlie can open and explore both notes following their nose without leaving their tool of preference.

I understand this repo belongs to a specific scripting lib. Do you know a place where the PKM communities discuss interoperability between tools?

@logseq-cldwalker
Copy link
Collaborator

Do you know a place where the PKM communities discuss interoperability between tools?

I don't know if there's much of a community around this yet. I imagine David at https://samepage.network/ would know as his product is largely focused on this

@Bad3r
Copy link

Bad3r commented Feb 3, 2023

There is some discussions in r/PKMS
https://www.reddit.com/r/PKMS/

@cristianvasquez
Copy link
Author

I'm looking into the RDF data, https://s.zazuko.com/3BjGKjB (with https://sketch.zazuko.com/) I can see the data produced is has types, some sort of taxonomy. Is this the triplification of https://docs.logseq.com itself? how do you handle relations?

I'm thinking of adopting the name 'Block' in the markdown triplifier, are blocks called 'blocks' in all outliner applications?

@logseq-cldwalker
Copy link
Collaborator

Is this the triplification of https://docs.logseq.com/ itself? how do you handle relations?

It's a triplification of a subset of the graph, not the whole graph. The script defaults to each node in a rdf triple corresponding to a logseq page but this is configurable by four queries. The configurability aims to make it easy for others to come up with different approaches to triplification. For example, one could write queries to triplify all blocks with properties. Personally I don't do that because Logseq's blocks aren't user friendly enough e.g. autocompletion isn't as good and blocks don't have names like pages do. By relations I think you mean rdfs properties. If so, they are just logseq property pages e.g. the linked refs in https://docs.logseq.com/#/page/Property

I'm thinking of adopting the name 'Block' in the markdown triplifier, are blocks called 'blocks' in all outliner applications?

I don't know. Some outliner apps also call them nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants