On Oct 11, 2013 4:13 PM, "Hady elsahar" <[email protected]> wrote:
>
> Hello All ,
>
> i was trying to get labels for Wikidata classes from the new wikidata
extracted dumps
> and i noticed that many of items contains more than one English label
>
> that's mainly because in Language.scala in noniso languages more than one
language are mapping to the English one
> check jbo for example it maps to English
>
> that means that using  Language.get(lang) will result in returning
different language object  than the needed one

What's the lang argument? Where does it come from?

There is a distinct Language object for each Wikipedia language. For
example, one for zh and one for zh-yue, although the ISO code for the
latter is mapped to zh. Language.get("zh-yue") will return a different
object than Language.get("zh").

But: Quad.scala uses only the ISO code. That's why triples generated from
zh-yue input appear with the zh language tag. You could change the second
constructor in Quad.scala to use the Wikipedia code instead. I'm not sure,
but I think the result might be invalid according to the RDF spec and RFC
3066 in particular.

It's a known problem that some Wikipedia language codes are incompatible
with ISO language codes. There are recurrent discussions on the Wikimedia
mailing lists about this.

JC

>
> i'm using such lines to Write Quads within languages available in DBpedia
>
> Language.get(lang) match
> {
> case Some(l) => quads += new Quad(l, DBpediaDatasets.WikidataLabels,
subjectUri, labelProperty, labelsMap(lang), page.sourceUri,
context.ontology.datatypes("xsd:string"))
> case _=>
> }
>
> how do you overcome such problem and stick to languages available in
DBpedia
>
> thanks
> Regards
> -------------------------------------------------
> Hady El-Sahar
> Research Assistant
> Center of Informatics Sciences | Nile University
>
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-developers

Reply via email to