Item https://www.wikidata.org/wiki/Q11518 has a math-datatype property https://www.wikidata.org/wiki/Property:P2534 with value
c^2=a^2+b^2
On Wikidata Query Server, this currently renders as math markup, either as a nicely formatted value (wdt:P 2534 ?value) or with str(?value) applied as:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block" alttext="{\displaystyle c^{2}=a^{2}+b^{2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>c</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>=</mo> <msup> <mi>a</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <msup> <mi>b</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle c^{2}=a^{2}+b^{2}}</annotation> </semantics> </math>
One can't access the raw input string though.
The request is to add an additional triple with the value as it would have string datatype and outputing as:
c^2=a^2+b^2
The triple can be made available in other exports. A new prefix would need to be defined, e.g. "psraw".
Sample access to the triple could be (for the sample above):
SELECT * { wd:Q11518 p:P2534/psraw:P2534 ?stringvalue }
Usecases:
- As Wikidata editor, I'd like to be able to extract from query server data values of properties I want to with use editing tools. This should be similar to other datatypes
- As WMF/WMDE employee, I like to make sure to implement the WMF open source strategy throughout Wikimedia maintained applications for code as well as content.
This is an alternative or complement to T195765 . It should not adversely impact current triples and without impact for the actual content of the property values.