Skip to content

Commit

Permalink
Deploying to gh-pages from @ 9e549d5 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Aethor committed Jul 2, 2024
1 parent 5d155cf commit 02e36ce
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 25 deletions.
8 changes: 5 additions & 3 deletions _sources/pipeline.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ want and pass this argument instead of the usual text:
from renard.pipeline.ner import NLTKNamedEntityRecognizer
from renard.pipeline.character_unification import GraphRulesCharacterUnifier
from renard.pipeline.graph_extraction import CoOccurrencesGraphExtractor
from renard.utils import blocks_indices
from renard.utils import block_bounds
with open("./my_doc.txt") as f:
text = f.read()
# let's suppose the 'cut_into_chapters' function cut the text into chapters
# let's suppose the 'cut_into_chapters' function cut the text into chapters.
chapters = cut_into_chapters(text)
pipeline = Pipeline(
Expand All @@ -281,7 +281,9 @@ want and pass this argument instead of the usual text:
]
)
out = pipeline(dynamic_blocks=block_indices(chapters))
# the 'block_bounds' function automatically extracts the boundaries of your
# block of text.
out = pipeline(text, dynamic_blocks=block_bounds(chapters))
Expand Down
6 changes: 5 additions & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ <h2 id="B">B</h2>
</li>
<li><a href="reference.html#renard.pipeline.speaker_attribution.BertSpeakerDetector">BertSpeakerDetector (class in renard.pipeline.speaker_attribution)</a>
</li>
<li><a href="reference.html#renard.utils.block_indices">block_indices() (in module renard.utils)</a>
<li><a href="reference.html#renard.utils.block_bounds">block_bounds() (in module renard.utils)</a>
</li>
<li><a href="reference.html#renard.utils.BlockBounds">BlockBounds (in module renard.utils)</a>
</li>
</ul></td>
</tr></table>
Expand All @@ -295,6 +297,8 @@ <h2 id="C">C</h2>
<li><a href="reference.html#renard.pipeline.core.PipelineState.character_network">character_network (renard.pipeline.core.PipelineState attribute)</a>
</li>
<li><a href="reference.html#renard.pipeline.core.PipelineState.characters">characters (renard.pipeline.core.PipelineState attribute)</a>
</li>
<li><a href="reference.html#renard.utils.charbb2tokenbb">charbb2tokenbb() (in module renard.utils)</a>
</li>
<li><a href="reference.html#renard.pipeline.core.Pipeline.check_valid">check_valid() (renard.pipeline.core.Pipeline method)</a>
</li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
8 changes: 5 additions & 3 deletions pipeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ <h3>Custom Segmentation<a class="headerlink" href="#custom-segmentation" title="
<span class="kn">from</span> <span class="nn">renard.pipeline.ner</span> <span class="kn">import</span> <span class="n">NLTKNamedEntityRecognizer</span>
<span class="kn">from</span> <span class="nn">renard.pipeline.character_unification</span> <span class="kn">import</span> <span class="n">GraphRulesCharacterUnifier</span>
<span class="kn">from</span> <span class="nn">renard.pipeline.graph_extraction</span> <span class="kn">import</span> <span class="n">CoOccurrencesGraphExtractor</span>
<span class="kn">from</span> <span class="nn">renard.utils</span> <span class="kn">import</span> <span class="n">blocks_indices</span>
<span class="kn">from</span> <span class="nn">renard.utils</span> <span class="kn">import</span> <span class="n">block_bounds</span>

<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s2">&quot;./my_doc.txt&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">text</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>

<span class="c1"># let&#39;s suppose the &#39;cut_into_chapters&#39; function cut the text into chapters</span>
<span class="c1"># let&#39;s suppose the &#39;cut_into_chapters&#39; function cut the text into chapters.</span>
<span class="n">chapters</span> <span class="o">=</span> <span class="n">cut_into_chapters</span><span class="p">(</span><span class="n">text</span><span class="p">)</span>

<span class="n">pipeline</span> <span class="o">=</span> <span class="n">Pipeline</span><span class="p">(</span>
Expand All @@ -346,7 +346,9 @@ <h3>Custom Segmentation<a class="headerlink" href="#custom-segmentation" title="
<span class="p">]</span>
<span class="p">)</span>

<span class="n">out</span> <span class="o">=</span> <span class="n">pipeline</span><span class="p">(</span><span class="n">dynamic_blocks</span><span class="o">=</span><span class="n">block_indices</span><span class="p">(</span><span class="n">chapters</span><span class="p">))</span>
<span class="c1"># the &#39;block_bounds&#39; function automatically extracts the boundaries of your</span>
<span class="c1"># block of text.</span>
<span class="n">out</span> <span class="o">=</span> <span class="n">pipeline</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">dynamic_blocks</span><span class="o">=</span><span class="n">block_bounds</span><span class="p">(</span><span class="n">chapters</span><span class="p">))</span>
</pre></div>
</div>
</section>
Expand Down
Loading

0 comments on commit 02e36ce

Please sign in to comment.