Math#
- class wikibaseintegrator.datatypes.math.Math(value=None, **kwargs)[source]#
Bases:
StringImplements the Wikibase data type ‘math’ for mathematical formula in TEX format
Constructor, calls the superclass BaseDataType
- from_sparql_value(sparql_value)[source]#
Parse data returned by a SPARQL endpoint and set the value to the object
Only an unknown value can be parsed: the RDF export holds a formula rendered as MathML (e.g. <math …><msup><mi>c</mi>…), not its TeX source, which is the value of the claim (c^2=a^2+b^2). The two can’t be compared, so a known value raises a ValueError and is left out of the fast run data.
- DTYPE = 'math'#
- PTYPE = 'http://wikiba.se/ontology#Math'#