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

Turtle* writer? #46

Open
lapidus opened this issue Aug 5, 2021 · 2 comments
Open

Turtle* writer? #46

lapidus opened this issue Aug 5, 2021 · 2 comments
Labels
v5-implemented The requested feature/fix is already implemented in the upcoming V5 alpha

Comments

@lapidus
Copy link

lapidus commented Aug 5, 2021

I am trying to create a test dataset for Stardog using the (somewhat agreed upon?) Turtle* (Turtle-star) syntax:

<< :Alice :worksFor :ACME >> :role :CEO ;  
                             :since 2010 ;
                             :probability 0.8 ;
                             :source <http://example.com/news> . 

https://www.stardog.com/blog/property-graphs-meet-stardog/

When writing and querying edge properties, an extended RDF and SPARQL syntax is needed. The RDF*/SPARQL* proposal defines an extension to Turtle syntax and the above example would look as follows:

This syntax works well most of the time but various Turtle shortcuts such as implicit bnodes ([]), predicate lists (;), and object lists (,) cannot be used inside the << >> patterns. This makes the syntax more verbose since the same subject has multiple outgoing edges, some of which have properties and some of which do not. To address this issue we support an alternative syntax in Stardog that puts edge properties next to the predicates.

Is there a way to output something like this with Graphy? (Either natively or via some temporary workaround?)

ps. Lovely work with graphy.js overall, big big thanks ...

@blake-regalia blake-regalia added the v5-implemented The requested feature/fix is already implemented in the upcoming V5 alpha label Aug 6, 2021
@blake-regalia
Copy link
Owner

blake-regalia commented Aug 6, 2021

Yes, the upcoming v5 (alpha coming soon) supports serializing to Turtle-star. It also handles reifying triples in subject and object position when writing to Turtle 1.1 for backwards-compatibility.

@lapidus
Copy link
Author

lapidus commented Aug 6, 2021

Brilliant! I’ll take it for a spin on a 3 GB conversion operation when alpha is out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v5-implemented The requested feature/fix is already implemented in the upcoming V5 alpha
Projects
None yet
Development

No branches or pull requests

2 participants