Skip to content

Commit

Permalink
Fix doc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Sep 19, 2023
1 parent b655687 commit 2e86c6b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 17 deletions.
15 changes: 10 additions & 5 deletions doc_src/overviews/collation_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ two strings: *the quick brown fox jumps over the lazy dog* and *sick fox is craz
.. raw:: html
:file: ../_static/super-collator-phase1.html

Every cell in the table contains three values, referred to as `D`, `P`, and `Q` in
Gotoh's paper, and an arrow, like this:
Every cell in the table contains three values: `D`, `P`, and `Q`, and an arrow, like this:

.. raw:: html
:align: center
Expand All @@ -128,22 +127,28 @@ Gotoh's paper, and an arrow, like this:
</tr>
</table>

We define the score `S` for each cell as:

.. math::
S = \max(D, P, Q)
The grayed cells in the first row and first column are initialized using the *gap start*
and *gap extension* penalties. The numbers for each remaining cell are calculated using
only values from the three cells, to the top-left, the top, and the left, of the current
cell:

.. math::
D = \max(D_↖, P_↖, Q_↖) + \mbox{similarity}(word_←, word_↑)
D = S_↖ + \mbox{similarity}(word_←, word_↑)
.. math::
P = \max(D_↑ + openingpenalty, P_↑ + extensionpenalty)
P = \max(S_↑ + openingpenalty, P_↑ + extensionpenalty)
.. math::
Q = \max(D_← + openingpenalty, Q_← + extensionpenalty)
Q = \max(S_← + openingpenalty, Q_← + extensionpenalty)
Finally the arrow in the current cell is set to point to that cell which yielded the
highest of the current cell's `D`, `P`, and `Q` values.
Expand Down
15 changes: 10 additions & 5 deletions docs/_sources/overviews/collation_tool.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ two strings: *the quick brown fox jumps over the lazy dog* and *sick fox is craz
.. raw:: html
:file: ../_static/super-collator-phase1.html

Every cell in the table contains three values, referred to as `D`, `P`, and `Q` in
Gotoh's paper, and an arrow, like this:
Every cell in the table contains three values: `D`, `P`, and `Q`, and an arrow, like this:

.. raw:: html
:align: center
Expand All @@ -128,22 +127,28 @@ Gotoh's paper, and an arrow, like this:
</tr>
</table>

We define the score `S` for each cell as:

.. math::
S = \max(D, P, Q)
The grayed cells in the first row and first column are initialized using the *gap start*
and *gap extension* penalties. The numbers for each remaining cell are calculated using
only values from the three cells, to the top-left, the top, and the left, of the current
cell:

.. math::
D = \max(D_↖, P_↖, Q_↖) + \mbox{similarity}(word_←, word_↑)
D = S_↖ + \mbox{similarity}(word_←, word_↑)
.. math::
P = \max(D_↑ + openingpenalty, P_↑ + extensionpenalty)
P = \max(S_↑ + openingpenalty, P_↑ + extensionpenalty)
.. math::
Q = \max(D_← + openingpenalty, Q_← + extensionpenalty)
Q = \max(S_← + openingpenalty, Q_← + extensionpenalty)
Finally the arrow in the current cell is set to point to that cell which yielded the
highest of the current cell's `D`, `P`, and `Q` values.
Expand Down
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/overviews/collation_tool.doctree
Binary file not shown.
14 changes: 8 additions & 6 deletions docs/overviews/collation_tool.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ <h3>Phase 1 - Build Table<a class="headerlink" href="#phase-1-build-table" title
<tr><th class='left'>dog</th><td class='outer prefilled'><table><tr><td class='d inner'>-2.10</td><td class='p inner em'>-2.10</td></tr><tr><td class='q inner'>-2.10</td><td class='inner arrow'></td></tr></table></td><td class='outer'><table><tr><td class='d inner'>-1.90</td><td class='p inner em'>-1.74</td></tr><tr><td class='q inner'>-2.30</td><td class='inner arrow'></td></tr></table></td><td class='outer'><table><tr><td class='d inner'>-1.54</td><td class='p inner em'>-0.84</td></tr><tr><td class='q inner'>-2.24</td><td class='inner arrow'></td></tr></table></td><td class='outer'><table><tr><td class='d inner'>-0.64</td><td class='p inner em'>-0.46</td></tr><tr><td class='q inner'>-1.34</td><td class='inner arrow'></td></tr></table></td><td class='outer bt'><table><tr><td class='d inner'>-0.26</td><td class='p inner em'>-0.10</td></tr><tr><td class='q inner'>-0.96</td><td class='inner arrow'></td></tr></table></td></tr>
</table>

<p>Every cell in the table contains three values, referred to as <span class="math notranslate nohighlight">\(D\)</span>, <span class="math notranslate nohighlight">\(P\)</span>, and <span class="math notranslate nohighlight">\(Q\)</span> in
Gotoh’s paper, and an arrow, like this:</p>
<p>Every cell in the table contains three values: <span class="math notranslate nohighlight">\(D\)</span>, <span class="math notranslate nohighlight">\(P\)</span>, and <span class="math notranslate nohighlight">\(Q\)</span>, and an arrow, like this:</p>
<table class='super-collator super-collator-debug-matrix' style="margin-left: auto; margin-right: auto">
<tr><td class='outer'>
<table>
Expand All @@ -335,16 +334,19 @@ <h3>Phase 1 - Build Table<a class="headerlink" href="#phase-1-build-table" title
</table>
</td>
</tr>
</table><p>The grayed cells in the first row and first column are initialized using the <em>gap start</em>
</table><p>We define the score <span class="math notranslate nohighlight">\(S\)</span> for each cell as:</p>
<div class="math notranslate nohighlight">
\[S = \max(D, P, Q)\]</div>
<p>The grayed cells in the first row and first column are initialized using the <em>gap start</em>
and <em>gap extension</em> penalties. The numbers for each remaining cell are calculated using
only values from the three cells, to the top-left, the top, and the left, of the current
cell:</p>
<div class="math notranslate nohighlight">
\[D = \max(D_↖, P_↖, Q_↖) + \mbox{similarity}(word_←, word_↑)\]</div>
\[D = S_↖ + \mbox{similarity}(word_←, word_↑)\]</div>
<div class="math notranslate nohighlight">
\[P = \max(D_↑ + openingpenalty, P_↑ + extensionpenalty)\]</div>
\[P = \max(S_↑ + openingpenalty, P_↑ + extensionpenalty)\]</div>
<div class="math notranslate nohighlight">
\[Q = \max(D_← + openingpenalty, Q_← + extensionpenalty)\]</div>
\[Q = \max(S_← + openingpenalty, Q_← + extensionpenalty)\]</div>
<p>Finally the arrow in the current cell is set to point to that cell which yielded the
highest of the current cell’s <span class="math notranslate nohighlight">\(D\)</span>, <span class="math notranslate nohighlight">\(P\)</span>, and <span class="math notranslate nohighlight">\(Q\)</span> values.</p>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 2e86c6b

Please sign in to comment.