I get the following result with no indication of language, and this is not helpful to me.
{
<http://statcan.gc.ca/ndm/3610051701> <http://purl.org/dc/terms/issued> "2012-10-15T12:30:00Z" ;
<http://purl.org/dc/terms/description> "<p>This table contains 42 series, with data for years 1961 - 2011</p>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> , "<p>Ce tableau contient 42 séries, avec des données pour les années 1961 - 2011 </p>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> ;
<http://purl.org/dc/terms/identifier> "3610051701" ;
<http://purl.org/dc/terms/title> "Comptes du bilan national, Banque du Canada, annuel, 1961 - 2011"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> , "National balance sheet, Bank of Canada, annual, 1961 - 2011"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString> ;
}
I read previous posts with similar issues and was wondering whether it has been fixed. Otherwise, what do you recommend? BTW, this was run with version 6.2.2.
Thanks,
Francine.
In your mapping, you have a space between the string literals and your language tags. In the spec(s) there should not be one. So if you do dct:description "?description_en"@en; you should see the results you want.
Hi Stephen,
No, that does not work. I was actually trying different things to make it work, and, one of them was to add a space. I simply forgot to remove it before posting. It produces the same result.
Interesting that it's getting a langString datatype but not the language tag. The previous reports you're referring to might be about dynampically applying the language tag from a mapping but I'm not sure what specific report you're referencing.
Are you mapping from a JSON file or MongoDB? If it's a JSON file or if you're materializing the data from MongoDB an interim solution could be to use a throw away predicate and then do a sparql update to get the language tag and correct the predicate.
dct:description "?description_en" @en; to :description_en "?description_en" @en;
Hi Zachary,
For the report, I grabbed the text from Stardog Studio in Visualize...
Thanks for putting me on the right track. I used temp predicates as you suggested. But "?description_en"@en is treated as a literal, so I had to update with a query:
INSERT {
?dataset dct:description ?new_description.
}
WHERE {
?dataset a dcat:Dataset; ndm:description_fr ?description_fr.
BIND (STRLANG(?description_en,'en') AS ?new_description).
};
Great. I'm glad to hear that worked out for you. It would obviously be better to be able to do it in the mapping but hopefully this is a workable interim solution if there actually is a bug with the mapping service.
Your update query is what I had in mind. It looks like you're mixing up en and fr but I'm guessing that's just a copy/paste error. You can also delete the dummy predicates with a DELETE/INSERT/WHERE update query.
I don't think it's supported yet for the relational db mapings but it may be supported for the json mappings. It didn't occur to me at the time you asked your question that this might be the case which is probably why @jess is asking if you tried it or if you just assumed it didn't work from the previous report of it not working with the relational mapping.
@zachary.whitley, I tried it. And this is what I got: Binding functions other than template() and cast are unsupported. Found StrLang for variable new_description
But as I mentioned earlier, I am using version 6.2.2. I am mapping from MongoDB. @jess, I am glad to know that it will be in the newer release.