Skip to content

Commit

Permalink
Deploying to gh-pages from @ 4824f80 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
thobson88 committed Oct 29, 2024
1 parent feb41f0 commit 00d9c7c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
9 changes: 8 additions & 1 deletion _sources/getting-started/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,19 @@ To add a package:
$ poetry add [package name]
To run the Python tests:
To run the Python unit tests:

.. code-block:: bash
$ poetry run pytest
To run unit and integration tests, some of which depend on the `T-Res resources <../getting-started/resources.html>`_:

.. code-block:: bash
$ poetry run pytest tests --no-skip
If you want to use Jupyter notebook, run it as usual, and then select the
created kernel in "Kernel" > "Change kernel".

Expand Down
6 changes: 5 additions & 1 deletion getting-started/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@ <h2>How to use poetry<a class="headerlink" href="#how-to-use-poetry" title="Perm
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>poetry<span class="w"> </span>add<span class="w"> </span><span class="o">[</span>package<span class="w"> </span>name<span class="o">]</span>
</pre></div>
</div>
<p>To run the Python tests:</p>
<p>To run the Python unit tests:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>poetry<span class="w"> </span>run<span class="w"> </span>pytest
</pre></div>
</div>
<p>To run unit and integration tests, some of which depend on the <a class="reference external" href="../getting-started/resources.html">T-Res resources</a>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>poetry<span class="w"> </span>run<span class="w"> </span>pytest<span class="w"> </span>tests<span class="w"> </span>--no-skip
</pre></div>
</div>
<p>If you want to use Jupyter notebook, run it as usual, and then select the
created kernel in “Kernel” &gt; “Change kernel”.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>jupyter<span class="w"> </span>notebook
Expand Down
4 changes: 2 additions & 2 deletions reference/geoparser/ranker.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.geoparser
</div>
<dl class="py method">
<dt class="sig sig-object py" id="t_res.geoparser.ranking.Ranker.check_if_contained">
<span class="sig-name descname"><span class="pre">check_if_contained</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">row</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><span class="pre">float</span></a></span></span><a class="headerlink" href="#t_res.geoparser.ranking.Ranker.check_if_contained" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">check_if_contained</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">row</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><span class="pre">float</span></a></span></span><a class="headerlink" href="#t_res.geoparser.ranking.Ranker.check_if_contained" title="Permalink to this definition"></a></dt>
<dd><p>Returns the amount of overlap, if a mention is contained within a row
in the dataset.</p>
<dl class="field-list simple">
Expand Down Expand Up @@ -229,7 +229,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.geoparser

<dl class="py method">
<dt class="sig sig-object py" id="t_res.geoparser.ranking.Ranker.damlev_dist">
<span class="sig-name descname"><span class="pre">damlev_dist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">row</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><span class="pre">float</span></a></span></span><a class="headerlink" href="#t_res.geoparser.ranking.Ranker.damlev_dist" title="Permalink to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">damlev_dist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">row</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><span class="pre">float</span></a></span></span><a class="headerlink" href="#t_res.geoparser.ranking.Ranker.damlev_dist" title="Permalink to this definition"></a></dt>
<dd><p>Calculate the Damerau-Levenshtein distance between a mention and a row
in the dataset.</p>
<dl class="field-list simple">
Expand Down
6 changes: 3 additions & 3 deletions reference/utils/preprocess_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.pre
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)">pandas.DataFrame</a></p>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)">pandas.DataFrame</a></p>
</dd>
</dl>
<div class="admonition note">
Expand Down Expand Up @@ -239,7 +239,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.pre
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)">pandas.DataFrame</a></p>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)">pandas.DataFrame</a></p>
</dd>
</dl>
<div class="admonition note">
Expand Down Expand Up @@ -351,7 +351,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.pre
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)">pandas.DataFrame</a></p>
<dd class="field-odd"><p><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)">pandas.DataFrame</a></p>
</dd>
</dl>
<div class="admonition note">
Expand Down
4 changes: 2 additions & 2 deletions reference/utils/process_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.pro

<dl class="py function">
<dt class="sig sig-object py" id="t_res.utils.process_data.update_with_linking">
<span class="sig-prename descclassname"><span class="pre">t_res.utils.process_data.</span></span><span class="sig-name descname"><span class="pre">update_with_linking</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ner_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">link_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></span><a class="headerlink" href="#t_res.utils.process_data.update_with_linking" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">t_res.utils.process_data.</span></span><span class="sig-name descname"><span class="pre">update_with_linking</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ner_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">link_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></span><a class="headerlink" href="#t_res.utils.process_data.update_with_linking" title="Permalink to this definition"></a></dt>
<dd><p>Updates the NER predictions by incorporating linking results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
Expand All @@ -407,7 +407,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.pro

<dl class="py function">
<dt class="sig sig-object py" id="t_res.utils.process_data.update_with_skyline">
<span class="sig-prename descclassname"><span class="pre">t_res.utils.process_data.</span></span><span class="sig-name descname"><span class="pre">update_with_skyline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ner_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">link_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></span><a class="headerlink" href="#t_res.utils.process_data.update_with_skyline" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">t_res.utils.process_data.</span></span><span class="sig-name descname"><span class="pre">update_with_skyline</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ner_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">link_predictions</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)"><span class="pre">Series</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></span><a class="headerlink" href="#t_res.utils.process_data.update_with_skyline" title="Permalink to this definition"></a></dt>
<dd><p>Updates the NER predictions with the skyline link from entity linking.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
Expand Down
2 changes: 1 addition & 1 deletion reference/utils/rel_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">t_res.utils.rel
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>df</strong> (<a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1584.ge3e198f3cf)"><em>pandas.DataFrame</em></a>) – The pandas DataFrame containing the prepared
<li><p><strong>df</strong> (<a class="reference external" href="http://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v3.0.0.dev0+1585.ge3a3a4a5fb)"><em>pandas.DataFrame</em></a>) – The pandas DataFrame containing the prepared
dataset.</p></li>
<li><p><strong>rel_params</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a>) – Dictionary containing the parameters for performing
entity disambiguation using the <code class="docutils literal notranslate"><span class="pre">reldisamb</span></code> approach.</p></li>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 00d9c7c

Please sign in to comment.