Skip to content

Commit

Permalink
Add changes for badabb3
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 21, 2023
1 parent d472750 commit 340b6f9
Show file tree
Hide file tree
Showing 15 changed files with 101 additions and 74 deletions.
8 changes: 4 additions & 4 deletions _modules/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />

<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.07.26 -->
<link rel="shortcut icon" href="../_static/favicon.ico"/><!-- Generated with Sphinx 7.2.2 and Furo 2023.08.19 -->
<title>Overview: module code - spacy-wrap 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
Expand Down Expand Up @@ -255,9 +255,9 @@ <h1>All modules for which code is available</h1>

</aside>
</div>
</div><script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=b6a3ec9a"></script>
</div><script src="../_static/documentation_options.js?v=ce631d2c"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/scripts/furo.js?v=32e29ea5"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=f281be69"></script>
Expand Down
13 changes: 8 additions & 5 deletions _modules/spacy_wrap/pipeline_component_seq_clf.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="../../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.07.26 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.2.2 and Furo 2023.08.19 -->
<title>spacy_wrap.pipeline_component_seq_clf - spacy-wrap 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
Expand Down Expand Up @@ -530,7 +530,9 @@ <h1>Source code for spacy_wrap.pipeline_component_seq_clf</h1><div class="highli
<span class="k">return</span> <span class="n">doc</span>


<div class="viewcode-block" id="make_sequence_classification_transformer"><a class="viewcode-back" href="../../wrap.pipeline_component.html#spacy_wrap.pipeline_component_seq_clf.make_sequence_classification_transformer">[docs]</a><span class="nd">@Language</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span>
<div class="viewcode-block" id="make_sequence_classification_transformer">
<a class="viewcode-back" href="../../wrap.pipeline_component.html#spacy_wrap.pipeline_component_seq_clf.make_sequence_classification_transformer">[docs]</a>
<span class="nd">@Language</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span>
<span class="s2">&quot;sequence_classification_transformer&quot;</span><span class="p">,</span>
<span class="n">default_config</span><span class="o">=</span><span class="n">DEFAULT_CONFIG</span><span class="p">[</span><span class="s2">&quot;sequence_classification_transformer&quot;</span><span class="p">],</span>
<span class="p">)</span>
Expand Down Expand Up @@ -609,6 +611,7 @@ <h1>Source code for spacy_wrap.pipeline_component_seq_clf</h1><div class="highli
<span class="n">assign_to_cats</span><span class="o">=</span><span class="n">assign_to_cats</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">clf_trf</span></div>

</pre></div>
</article>
</div>
Expand Down Expand Up @@ -648,9 +651,9 @@ <h1>Source code for spacy_wrap.pipeline_component_seq_clf</h1><div class="highli

</aside>
</div>
</div><script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=b6a3ec9a"></script>
</div><script src="../../_static/documentation_options.js?v=ce631d2c"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=f281be69"></script>
Expand Down
13 changes: 8 additions & 5 deletions _modules/spacy_wrap/pipeline_component_tok_clf.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="../../">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />

<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.07.26 -->
<link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 7.2.2 and Furo 2023.08.19 -->
<title>spacy_wrap.pipeline_component_tok_clf - spacy-wrap 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=135e06be" />
Expand Down Expand Up @@ -635,7 +635,9 @@ <h1>Source code for spacy_wrap.pipeline_component_tok_clf</h1><div class="highli
<span class="k">return</span> <span class="n">doc</span>


<div class="viewcode-block" id="make_token_classification_transformer"><a class="viewcode-back" href="../../wrap.pipeline_component.html#spacy_wrap.pipeline_component_tok_clf.make_token_classification_transformer">[docs]</a><span class="nd">@Language</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span>
<div class="viewcode-block" id="make_token_classification_transformer">
<a class="viewcode-back" href="../../wrap.pipeline_component.html#spacy_wrap.pipeline_component_tok_clf.make_token_classification_transformer">[docs]</a>
<span class="nd">@Language</span><span class="o">.</span><span class="n">factory</span><span class="p">(</span>
<span class="s2">&quot;token_classification_transformer&quot;</span><span class="p">,</span>
<span class="n">default_config</span><span class="o">=</span><span class="n">DEFAULT_CONFIG</span><span class="p">[</span><span class="s2">&quot;token_classification_transformer&quot;</span><span class="p">],</span>
<span class="p">)</span>
Expand Down Expand Up @@ -721,6 +723,7 @@ <h1>Source code for spacy_wrap.pipeline_component_tok_clf</h1><div class="highli
<span class="n">predictions_to</span><span class="o">=</span><span class="n">predictions_to</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">clf_trf</span></div>

</pre></div>
</article>
</div>
Expand Down Expand Up @@ -760,9 +763,9 @@ <h1>Source code for spacy_wrap.pipeline_component_tok_clf</h1><div class="highli

</aside>
</div>
</div><script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js?v=b6a3ec9a"></script>
</div><script src="../../_static/documentation_options.js?v=ce631d2c"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/scripts/furo.js?v=32e29ea5"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=f281be69"></script>
Expand Down
4 changes: 4 additions & 0 deletions _static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down
3 changes: 1 addition & 2 deletions _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '1.4.4',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
Expand Down
26 changes: 17 additions & 9 deletions _static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
Expand Down Expand Up @@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},

/**
Expand Down
16 changes: 13 additions & 3 deletions _static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};

_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
18 changes: 9 additions & 9 deletions faq.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="./">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -16,7 +16,7 @@
<meta name="twitter:card" content="summary_large_image" />
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="prev" title="News and Changelog" href="news.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.07.26 -->
<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.2 and Furo 2023.08.19 -->
<title>Frequently asked questions - spacy-wrap 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
Expand Down Expand Up @@ -235,9 +235,9 @@
</div>
<article role="main">
<section id="frequently-asked-questions">
<h1>Frequently asked questions<a class="headerlink" href="#frequently-asked-questions" title="Permalink to this heading">#</a></h1>
<h1>Frequently asked questions<a class="headerlink" href="#frequently-asked-questions" title="Link to this heading">#</a></h1>
<section id="citing-spacy-wrap">
<h2>Citing spacy-wrap<a class="headerlink" href="#citing-spacy-wrap" title="Permalink to this heading">#</a></h2>
<h2>Citing spacy-wrap<a class="headerlink" href="#citing-spacy-wrap" title="Link to this heading">#</a></h2>
<p>If you wish this library in your research, please cite it using (Changing the version if relevant):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nd">@software</span><span class="p">{</span><span class="n">Enevoldsen_spaCy</span><span class="o">-</span><span class="n">wrap_For_Wrapping_2022</span><span class="p">,</span>
<span class="n">author</span> <span class="o">=</span> <span class="p">{</span><span class="n">Enevoldsen</span><span class="p">,</span> <span class="n">Kenneth</span><span class="p">},</span>
Expand All @@ -256,7 +256,7 @@ <h2>Citing spacy-wrap<a class="headerlink" href="#citing-spacy-wrap" title="Perm
</div>
</section>
<section id="how-do-i-test-the-code-and-run-the-test-suite">
<h2>How do I test the code and run the test suite?<a class="headerlink" href="#how-do-i-test-the-code-and-run-the-test-suite" title="Permalink to this heading">#</a></h2>
<h2>How do I test the code and run the test suite?<a class="headerlink" href="#how-do-i-test-the-code-and-run-the-test-suite" title="Link to this heading">#</a></h2>
<p>This package comes with an extensive test suite. In order to run the tests,
you’ll usually want to clone the repository and build the package from the
source. This will also install the required development dependencies
Expand All @@ -276,15 +276,15 @@ <h2>How do I test the code and run the test suite?<a class="headerlink" href="#h
</pre></div>
</div>
<section id="does-this-package-run-on-x">
<h3>Does this package run on X?<a class="headerlink" href="#does-this-package-run-on-x" title="Permalink to this heading">#</a></h3>
<h3>Does this package run on X?<a class="headerlink" href="#does-this-package-run-on-x" title="Link to this heading">#</a></h3>
<p>This package is intended to run on all major OS, this includes Windows (latest version), MacOS (latest) and the latest version of Linux (Ubuntu).
Similarly it also tested on python 3.8, and 3.9.
Please note these are only the systems this package is being actively tested on, if you run on a similar system (e.g. an earlier version of Linux) this package
will likely run there as well, if not please create an issue.</p>
</section>
</section>
<section id="how-is-the-documentation-generated">
<h2>How is the documentation generated?<a class="headerlink" href="#how-is-the-documentation-generated" title="Permalink to this heading">#</a></h2>
<h2>How is the documentation generated?<a class="headerlink" href="#how-is-the-documentation-generated" title="Link to this heading">#</a></h2>
<p>SpaCy-wrap uses <a class="reference external" href="https://www.sphinx-doc.org/en/master/index.html">sphinx</a> to generate
documentation. It uses the <a class="reference external" href="https://github.com/pradyunsg/furo">Furo</a> theme
with custom styling.</p>
Expand Down Expand Up @@ -372,9 +372,9 @@ <h2>How is the documentation generated?<a class="headerlink" href="#how-is-the-d

</aside>
</div>
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=b6a3ec9a"></script>
</div><script src="_static/documentation_options.js?v=ce631d2c"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
Expand Down
8 changes: 4 additions & 4 deletions genindex.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!doctype html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" data-content_root="./">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#" /><link rel="search" title="Search" href="search.html" />

<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.07.26 --><title>Index - spacy-wrap 1.4.4 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/><!-- Generated with Sphinx 7.2.2 and Furo 2023.08.19 --><title>Index - spacy-wrap 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand Down Expand Up @@ -270,9 +270,9 @@ <h2>M</h2>

</aside>
</div>
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=b6a3ec9a"></script>
</div><script src="_static/documentation_options.js?v=ce631d2c"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/scripts/furo.js?v=32e29ea5"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
Expand Down
Loading

0 comments on commit 340b6f9

Please sign in to comment.