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

Am .03.2016, 19:24 Uhr, schrieb Manuel Fiorelli  
<manuel.fiorelli@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@informatik.uni-frankfurt.de
web: http://acoli.cs.uni-frankfurt.de
tel: +49-(0)69-798-22463
fax: +49-(0)69-798-28931

Received on Monday, 14 March 2016 20:16:22 UTC