trings.</p>
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="co"># segment text into chunks of at most 10 tokens</span>
<span class="op">(</span><span class="va">chunks</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/text_split.html">text_split</a></span><span class="op">(</span><span class="va">text</span>, <span class="st">"tokens"</span>, <span class="fl">10</span><span class="op">)</span><span class="op">)</span></co