[open-linguistics] Question: replacing language codes in a SPARQL BIND statement?

Christian Chiarcos chiarcos at informatik.uni-frankfurt.de
Sun Mar 13 19:40:54 UTC 2016


Am .03.2016, 19:24 Uhr, schrieb Manuel Fiorelli  
<manuel.fiorelli at gmail.com>:

> Hi John, All
>
> In the SPARQL 1.1 specification, I found some functions that could be  
> useful to Dr. Christian Chiarcos.
>
> STRLANG (https://www.w3.org/TR/sparql11-query/#func-strlang) allows to  
> construct an RDF literal from its literal form and language tag, such as:
>
> bind(strlang("Mais", "it") as ?aLiteral)

Yes, strlang() was precisely what I was looking for. I felt I was missing  
something obvious, and I cannot quite explain how I missed that when I  
consulted the page. Thanks!

As for *fully automated* conversion, we can simply strip region subtags  
 from the language tag and then consult lexvo (e.g.,  
http://www.lexvo.org/page/iso639-3/rus) to retrieve the iso639-2 tag which  
is then assigned to the string via strlang().

Christian
-- 
Prof. Dr. Christian Chiarcos
Applied Computational Linguistics
Johann Wolfgang Goethe Universität Frankfurt a. M.
60054 Frankfurt am Main, Germany

office: Robert-Mayer-Str. 10, #401b
mail: chiarcos at informatik.uni-frankfurt.de
web: http://acoli.cs.uni-frankfurt.de
tel: +49-(0)69-798-22463
fax: +49-(0)69-798-28931
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/open-linguistics/attachments/20160313/7c6ff239/attachment-0003.html>


More information about the open-linguistics mailing list