Topic on Talk:Wikibase/Indexing/RDF Dump Format

Units representation and conversion

4
Smalyshev (WMF) (talkcontribs)

Planned units representation and conversion for full values:

  1. There will be a configuration on wiki (not specified here) describing conversion of units to standard units.
  2. Values in standard units will be expressed as "normalized" values (which later can be expanded to also represent other kinds of normalized values, e.g. for times, external IDs, etc.)
  3. Each of  psv/pqv/prv gets a duplicate called psn/pqn/prn linking to a normalized value node in parallel to a regular value. Normalized value can be the same value (if the value is already in standard units) or a different one. If the value has no units or the units can not be converted to a standard unit, no normalized value is produced and no psn/pqn/prn predicate is generated.
  4. Original value gets wikibase:quantityNormalized predicate linking it to the normalized value. This predicate is generated even if the value is already normalized - in this case, it links the value to itself. Normalized value also has wikibase:quantityNormalized linking to itself, since normalized value is its own normalization.

Unit representation & conversion for simple values is still TBD.

Smalyshev (WMF) (talkcontribs)

Example:

 wds:Q3-24bf3704-4c5d-083a-9b59-1881f82b6b37 a wikibase:Statement, wikibase:BestRank ;
       psv:P2 wdv:cb213eea7a0b90d1d7f65c6eabfab9da ;
       psn:P2 wdv:3efb2709bd74285cfc7e72b6a599125b ;
 wdv:cb213eea7a0b90d1d7f65c6eabfab9da a wikibase:QuantityValue ;
   wikibase:quantityAmount "+123"^^xsd:decimal ;
   wikibase:quantityUpperBound "+124"^^xsd:decimal ;
   wikibase:quantityLowerBound "+122"^^xsd:decimal ;
   wikibase:quantityNormalized wdv:3efb2709bd74285cfc7e72b6a599125b ;
   wikibase:quantityUnit <http://www.wikimedia.org/entity/Q828224> .
 wdv:3efb2709bd74285cfc7e72b6a599125b a wikibase:QuantityValue ;
   wikibase:quantityAmount "+123000"^^xsd:decimal ;
   wikibase:quantityUpperBound "+124000"^^xsd:decimal ;
   wikibase:quantityLowerBound "+122000"^^xsd:decimal ;
   wikibase:quantityNormalized wdv:3efb2709bd74285cfc7e72b6a599125b ;
   wikibase:quantityUnit <http://www.wikimedia.org/entity/Q11573> .
Pfps (talkcontribs)

It appears that this is already underway, at least for geospatial information. Is this the case?

Smalyshev (WMF) (talkcontribs)

Yes, we are starting to introduce unit conversions.

Reply to "Units representation and conversion"