How to specify language literals in hsparql?

If the original SPARQL is rdfs:label "D (programming language)"@en , what will the hsparql syntax be?

+4
source share
2 answers

I support the DSL hsparql you encountered. The `simpleSelectWithLiteral 'function is added as an example: https://github.com/robstewart57/hsparql/blob/master/tests/DBPedia.hs#L51

Does this solve your problem?

+2
source

Looking at the DSL definition (line 251) on the HSparql Github page looks like this:

 instance TermLike ([Char], [Char]) where varOrTerm (s, lang') = Term . RDFLiteralTerm $ RDFLiteralLang s lang' 

Too much time has passed since I wrote Haskell, so I'm not 100% sure what this means, but I assume that it means using a tuple of two lines:

 ("value", "en") 
+1
source

Source: https://habr.com/ru/post/1441109/


All Articles