Vvjjkkii renamed this task from "Export original TeX string of math values in RDF" to "e5baaaaaaa".
Vvjjkkii triaged this task as "High" priority.
Vvjjkkii removed a subscriber: Aklapper.
Vvjjkkii added projects: CheckUser, Connected-Open-Heritage-Batch-uploads (RAÄ-KMB_1_2017-02), Tamil-Sites, Gamepress, Hashtags, JADE, KartoEditor, Language-2018-Apr-June, New-Editor-Experiences, Mail, TCB-Team.
Vvjjkkii updated the task description. (Show Details)

CHANGES TO TASK DESCRIPTION
Currently, we only export the MathML representation of a formula to RDF/Wikidata Query Service, not the original TeX string (T126349). This makes it impossible to efficiently query for statements with a certain math value – you have to use `REGEX` (`CONTAINS` is not enough, because the TeX annotation embedded in the MathML is not identical to the original TeX string). It also means that any external application that wants to use the TeX string based on the RDF export must use an XML parser to analyze the MathML and extract the TeX annotation.

See T126349#2014848 for more information.


----

I think we should add full value nodes for math values, with a structure a bit like this:

```lang=sparql
wd:Q4115189 a wikibase:Item;
# ...
wdt:P2534 "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\" alttext=\"{\\displaystyle a}\">\n <semantics>\n <mrow class=\"MJX-TeXAtom-ORD\">\n <mstyle displaystyle=\"true\" scriptlevel=\"0\">\n <mi>a</mi>\n </mstyle>\n </mrow>\n <annotation encoding=\"application/x-tex\">{\\displaystyle a}</annotation>\n </semantics>\n</math>"^^<http://www.w3.org/1998/Math/MathML>.

wd:Q4115189 p:P2534 wds:Q4115189-af122b69-484b-2edd-1af8-f0a691b05039.

wds:Q4115189-af122b69-484b-2edd-1af8-f0a691b05039 a wikibase:Statement;
ps:P2534 "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\" alttext=\"{\\displaystyle a}\">\n <semantics>\n <mrow class=\"MJX-TeXAtom-ORD\">\n <mstyle displaystyle=\"true\" scriptlevel=\"0\">\n <mi>a</mi>\n </mstyle>\n </mrow>\n <annotation encoding=\"application/x-tex\">{\\displaystyle a}</annotation>\n </semantics>\n</math>"^^<http://www.w3.org/1998/Math/MathML>;
psv:P2534 wdv:d961720c22709f7991be5be0ddf51c88.

wdv:d961720c22709f7991be5be0ddf51c88 a wikibase:MathValue;
wikibase:mathML "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\" alttext=\"{\\displaystyle a}\">\n <semantics>\n <mrow class=\"MJX-TeXAtom-ORD\">\n <mstyle displaystyle=\"true\" scriptlevel=\"0\">\n <mi>a</mi>\n </mstyle>\n </mrow>\n <annotation encoding=\"application/x-tex\">{\\displaystyle a}</annotation>\n </semantics>\n</math>"^^<http://www.w3.org/1998/Math/MathML>;
wikibase:mathTeX "a"^^<http://latex.example/TODO>.
```

Side note: the “math” datatype currently seems to be missing completely from the [RDF Dump Format](https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format) page – once we’ve implemented this, we should rectify that.

---

See also the discussion on the [request a query](https://www.wikidata.org/wiki/Wikidata:Request_a_query#Defining_formula_(P2534%29) page.
26570726f6475636520796f757220627567207573696e67206120726563656e742076657273696f6e206f662074686520736f6674776172652c20746f2068652077696b6920636f6e74656e74206c616e67756167652e0a0a5468616e6b20796f752e0a546167730a436865636b557365720ad70a436f6e6e65637465642d4f70656e2d48657269746167652d42617463682d75706c6f61647320285241c42d4b4d425f315f323031372d3032290ad70a54616d696c2d53697465730ad70a47616d6570726573730ad70a48617368746167730ad70a4a4144450ad70a4b6172746f456469746f720ad70a4c616e67756167652d323031382d4170722d4a756e650ad70a4e65772d456469746f722d457870657269656e6365730ad70a4d61696c0ad70a5443422d5465616d0ad70a53756273637269626572730a4465736372697074696f6e20507265766965770a436f6e74656e77a6f6e652073657474696e6720696e20796f75722070726f66696c652c20636c69636b20746f207265636f6e63696c652e

TASK DETAIL
https://phabricator.wikimedia.org/T195765

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Vvjjkkii
Cc: Esc3300, mkroetzsch, Tagishsimon, Debenben, Smalyshev, Physikerwelt, Lucas_Werkmeister_WMDE, AndyTan, Zylc, 1978Gage2001, Lahi, Gq86, Darkminds3113, herron, pan199312, GoranSMilovanovic, Maosef, Chicocvenancio, alanajjar, QZanden, EBjune, Tbscho, merbst, LawExplorer, Lea_WMDE, Mattias_Ostmar-WMSE, Avner, JJMC89, Gehel, Jseddon, Ryuch, Mkdw, RuyP, JEumerus, Jonas, FloNight, Xmlizer, Trizek-WMF, KasiaWMDE, Izno, 0x010C, srodlund, Luke081515, grin, Bsadowski1, mys_721tx, jkroll, Wikidata-bugs, Jdouglas, Snowolf, aude, Tobias1984, fredw, Huji, Pkra, Manybubbles, Gryllida, jayvdb, Tobi_WMDE_SW, revi, scfc, He7d3r, Romaine, Mbch331, Jay8g, Glaisher, Krenair, chasemp, Aklapper
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to