[10:01:55] [telegram] Does someone here know where the transformation from the native json in wikidata to the rdf model happens? I am looking for documentation on how the JSON and RDF model map [11:44:11] [telegram] So beyond just https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format ? [19:26:50] [telegram] is there any way to truncate or trim in sparql? [19:30:12] [telegram] you could use replace() if there's nothing else? [19:35:16] [telegram] I have years, and I want centuries... [19:36:12] [telegram] then you need to divide by 100 rather than trim or something [19:36:21] [telegram] there is SUBSTR though [19:36:32] [telegram] https://www.w3.org/TR/sparql11-query/#func-substr [19:36:48] [telegram] actually divide by 100 and add 1... I'll give a try [19:36:54] [telegram] https://en.m.wikibooks.org/wiki/SPARQL/Expressions_and_Functions [19:37:32] [telegram] BIND( FLOOR(YEAR(?born)/100)*100 AS ?century ) [19:37:44] [telegram] I couldn't find it... was looking at trim, left, right, len... [19:38:15] [telegram] /me always looks up sparql stuff in the w3.org query specification [19:55:17] [telegram] is 2000 the same century as 2001? (re @Galder: actually divide by 100 and add 1... I'll give a try) [19:57:42] [telegram] I should have just asked Wikipedia of course. your method is the same as "general usage" on enwiki [19:58:51] [telegram] I think this is a very holy war topic :) (re @jeremy_b: is 2000 the same century as 2001?) [19:59:35] [telegram] spaces or tabs? :) (re @Thecladis: I think this is a very holy war topic :)) [20:00:48] [telegram] 2000 is 20th century, but for what I need, dividing by 100 and adding 1 is enough [20:04:39] [telegram] spaces :) (re @jeremy_b: spaces or tabs? :)) [20:06:23] [telegram] well both are easy to calculate but maybe general usage is better anyway. [20:06:24] [telegram] this produces 20 for 2000: [20:06:25] [telegram] int((year−1)/100+1) (re @Galder: 2000 is 20th century, but for what I need, dividing by 100 and adding 1 is enough) [20:07:35] [telegram] /100 [20:08:19] [telegram] Great