Open ShaRefOh opened 7 months ago
Hi @ShaRefOh @pepoospina , the current functionality creates a string in the RDF output format we want (by default it's turtle). You can see an example here: https://github.com/csensemakers/desci-sense/blob/st-dev/nlp/notebooks/firebase_parser_test.ipynb
Note that now the ParserResult is an RDF Graph - this is what we wanted, right? https://github.com/csensemakers/desci-sense/blob/4b17fb4f05961ceb4e3872bae4427b029af7ff1d/nlp/desci_sense/shared_functions/interface.py#L163
I'm close to finishing this and we can merge back with main
Yes @ronentk , the semantics property is expected to be just one RDF string now. Not an array of string triplets as before.
Hey @ronentk, @pepoospina and I agreed that the Python output should be decoupled for the Nanopub-specific syntax and placeholders, as other apps and integrations would also use the triplets. Therefore, we should use a placeholder for ourselves.
The format will use regular triplets. For triplets that represent the relation between the post and the URL, we will use:
<_:this_post><www.example.com/relation><www.example2.com>
If the triplet represents that the post has keywords, we will use:<_:this_post><http://pcp-on-web.de/ontology#hasKeyword> "keyword"
Then on the ts nanopub construction side, we will replace the placeholder
<_:this_post>
with the nanopub placeholder<http://purl.org/nanopub/temp/mynanopub#assertion>