Skip to content

Commit

Permalink
[skip ci] Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Mar 12, 2024
1 parent a689ea8 commit db15a57
Show file tree
Hide file tree
Showing 28 changed files with 71 additions and 71 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
32 changes: 16 additions & 16 deletions latest/_modules/doctr/utils/metrics.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions latest/_modules/doctr/utils/visualization.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ <h1>Source code for doctr.utils.visualization</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">mplcursors</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">anyascii</span> <span class="kn">import</span> <span class="n">anyascii</span>
<span class="kn">from</span> <span class="nn">matplotlib.figure</span> <span class="kn">import</span> <span class="n">Figure</span>
<span class="kn">from</span> <span class="nn">PIL</span> <span class="kn">import</span> <span class="n">Image</span><span class="p">,</span> <span class="n">ImageDraw</span>
<span class="kn">from</span> <span class="nn">unidecode</span> <span class="kn">import</span> <span class="n">unidecode</span>

<span class="kn">from</span> <span class="nn">.common_types</span> <span class="kn">import</span> <span class="n">BoundingBox</span><span class="p">,</span> <span class="n">Polygon4P</span>
<span class="kn">from</span> <span class="nn">.fonts</span> <span class="kn">import</span> <span class="n">get_font</span>
Expand Down Expand Up @@ -575,8 +575,8 @@ <h1>Source code for doctr.utils.visualization</h1><div class="highlight"><pre>
<span class="k">try</span><span class="p">:</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">word</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">],</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">UnicodeEncodeError</span><span class="p">:</span>
<span class="c1"># When character cannot be encoded, use its unidecode version</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">unidecode</span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">]),</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="c1"># When character cannot be encoded, use its anyascii version</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">anyascii</span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">]),</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>

<span class="c1"># Colorize if draw_proba</span>
<span class="k">if</span> <span class="n">draw_proba</span><span class="p">:</span>
Expand Down Expand Up @@ -706,8 +706,8 @@ <h1>Source code for doctr.utils.visualization</h1><div class="highlight"><pre>
<span class="k">try</span><span class="p">:</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">prediction</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">],</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">UnicodeEncodeError</span><span class="p">:</span>
<span class="c1"># When character cannot be encoded, use its unidecode version</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">unidecode</span><span class="p">(</span><span class="n">prediction</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">]),</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="c1"># When character cannot be encoded, use its anyascii version</span>
<span class="n">d</span><span class="o">.</span><span class="n">text</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">anyascii</span><span class="p">(</span><span class="n">prediction</span><span class="p">[</span><span class="s2">&quot;value&quot;</span><span class="p">]),</span> <span class="n">font</span><span class="o">=</span><span class="n">font</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>

<span class="c1"># Colorize if draw_proba</span>
<span class="k">if</span> <span class="n">draw_proba</span><span class="p">:</span>
Expand Down
4 changes: 2 additions & 2 deletions latest/modules/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ <h3>Args:<a class="headerlink" href="#id5" title="Permalink to this heading">#</
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p><ul class="simple">
<li><p><em>a dictionary with the exact match score for the raw data, its lower-case counterpart, its unidecode</em></p></li>
<li><p><em>counterpart and its lower-case unidecode counterpart</em></p></li>
<li><p><em>a dictionary with the exact match score for the raw data, its lower-case counterpart, its anyascii</em></p></li>
<li><p><em>counterpart and its lower-case anyascii counterpart</em></p></li>
</ul>
</p>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit db15a57

Please sign in to comment.