Closed JordanShurmer closed 8 months ago
Thanks for your interest in this crate. And thanks to @MattesWhite for quickly responding with a proposal. I adapted the example and merged it.
I leave this issue open, because I intend to add more examples later. But that will be after I integrate more parsers (Turtle, TriG...) from the https://github.com/Tpt/rio crate.
Awesome! Thanks @MattesWhite
I think it would be nice to have some examples for each crate. Also very helpful, would be a mdbook for detailed documentation - and the rendered docs page a nice start for developers.
What do you think about it? I could add PR with a docs folder and prepare something (setup mdbook, structure. GitHub deploy action, etc).
Best wishes ✌️
@huhn511 That would be really nice indeed, and yes, a PR would be greatly appreciated :)
In a loop over all triples, I wanted to put all literal objects in one vec, all subjects and non-literal (and non-blank) objects in one vec, and all predicates + their subject and object in an other data structure (vec?), to be able to use them in a graph-data structure (petgraph) later on. I was not able to do that, as I am a rust newb, and got lost in the lifetime, and nested data-structure complexity of it (from the sophia side). Such an example would be nice to see for me (without the petgraph part, maybe?).
I guess I would store the Rc<str>
in my vec
, right?
how would I get to it, in the loop?
@hoijui I just opened the discussion feature, so that we can have StackOverflow style Q&A's, which I think is more appropriate for that kind of question. I suggest that you open a question there, and provide an code example... I'll have a look.
We now have an MD-Book here: https://pchampin.github.io/sophia_rs/
It is far from complete, but I consider maintaining it as part of maintaining the crate, so this issue can be closed.
This create looks really promising for my Linked Data project. However, I'm really unsure about how to get started using it.
It would be really useful to have some examples of doing the most common things in the rust docs. For example: How to create a graph, add some triples, and write it as turtle to a file; How to read a turtle file in, parse it as a graph, then modify it's contents.
I'd be happy to contribute the documentation, if I can get some pointers on how to do it :)