Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literals with \ cause index build to fail #1392

Closed
Qup42 opened this issue Jul 10, 2024 · 3 comments · Fixed by #1394
Closed

Literals with \ cause index build to fail #1392

Qup42 opened this issue Jul 10, 2024 · 3 comments · Fixed by #1394

Comments

@Qup42
Copy link
Member

Qup42 commented Jul 10, 2024

After #1361 (9e8cc07) was merged the build of the WikiData index broke for me. The problems are also present on master (currently 14d6e1c). The AD_FAIL on line 145 of src/parser/RdfEscaping.cpp is being triggered by literals that seem to contain \displaystyle.... Could the changes to TurtleParser from the mentioned PR be related to these problems?

@Qup42
Copy link
Member Author

Qup42 commented Jul 11, 2024

One of the triples that seem to cause problems is

wd:Q2651 wdt:P2534 '<math xmlns="http://www.w3.org/1998/Math/MathML" display="block" alttext="{\displaystyle \sum -\log _{2}(p_{i})=-\log _{2}(0.6)-\log _{2}(0.1)-\log _{2}(0.1)=7.381{\text{ bits}}}">
  <semantics>
    <mrow class="MJX-TeXAtom-ORD">
      <mstyle displaystyle="true" scriptlevel="0">
        <mo>&#x2211;<!-- ∑ --></mo>
        <mo>&#x2212;<!-- − --></mo>
        <msub>
          <mi>log</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msub>
        <mo>&#x2061;<!-- ⁡ --></mo>
        <mo stretchy="false">(</mo>
        <msub>
          <mi>p</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mi>i</mi>
          </mrow>
        </msub>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <mo>&#x2212;<!-- − --></mo>
        <msub>
          <mi>log</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msub>
        <mo>&#x2061;<!-- ⁡ --></mo>
        <mo stretchy="false">(</mo>
        <mn>0.6</mn>
        <mo stretchy="false">)</mo>
        <mo>&#x2212;<!-- − --></mo>
        <msub>
          <mi>log</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msub>
        <mo>&#x2061;<!-- ⁡ --></mo>
        <mo stretchy="false">(</mo>
        <mn>0.1</mn>
        <mo stretchy="false">)</mo>
        <mo>&#x2212;<!-- − --></mo>
        <msub>
          <mi>log</mi>
          <mrow class="MJX-TeXAtom-ORD">
            <mn>2</mn>
          </mrow>
        </msub>
        <mo>&#x2061;<!-- ⁡ --></mo>
        <mo stretchy="false">(</mo>
        <mn>0.1</mn>
        <mo stretchy="false">)</mo>
        <mo>=</mo>
        <mn>7.381</mn>
        <mrow class="MJX-TeXAtom-ORD">
          <mtext>&#xA0;bits</mtext>
        </mrow>
      </mstyle>
    </mrow>
    <annotation encoding="application/x-tex">{\displaystyle \sum -\log _{2}(p_{i})=-\log _{2}(0.6)-\log _{2}(0.1)-\log _{2}(0.1)=7.381{\text{ bits}}}</annotation>
  </semantics>
</math>'^^<http://www.w3.org/1998/Math/MathML>

@joka921
Copy link
Member

joka921 commented Jul 12, 2024

Can you try building the index again including PR #1392 to confirm that this fixes your issue?

@Qup42
Copy link
Member Author

Qup42 commented Jul 14, 2024

I can confirm that it fixes the issue when applied to my working branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants