Open ShaRefOh opened 4 months ago
@ronentk, is http://sensentes/ThisText the object placeholder for all triplets?
Now the create.nanopub.ts , createNanopublication function first parses the rdf from the python to a n3 store, then it replaces all nodes in the store with uri https://sense-nets.xyz/mySemanticPost to http://purl.org/nanopub/temp/mynanopub#. using Pepo's replaceNode function:
const semanticsParserStore = await (async () => {
if (!semantics) return new Store();
return await parseRDF(semantics);
})();
// Define the replacement map that swaps our placeholder with np placeholder
const replaceMap: Record<string, string> = {
'https://sense-nets.xyz/mySemanticPost': 'http://purl.org/nanopub/temp/mynanopub#'
};
const semanticsStore = replaceNodes(semanticsParserStore, replaceMap);
Ok @pepoospina @ShaRefOh I created a PR to update the placeholder
Some triplets have the object http://sensentes/ThisText instead of sub:assertion.
See https://np.test.knowledgepixels.com/RAcRDZ_FVHwfAvSfL06jDt58kdIkkqvk4nlQa5FmYN5Ds