chore: Update NlpSentenceChunking constructor parameters to None

The NlpSentenceChunking constructor parameters have been updated to None in order to simplify the usage of the class. This change removes the need for specifying the SpaCy model for sentence detection, making the code more concise and easier to understand.
This commit is contained in:
unclecode
2024-05-17 17:00:43 +08:00
parent 647cfda225
commit 32c87f0388
3 changed files with 7 additions and 6 deletions

View File

@@ -236,12 +236,11 @@ chunks = chunker.chunk("This is a sample text. It will be split into chunks.")
<h4>Constructor Parameters:</h4>
<ul>
<li>
<code>model</code> (str, optional): The SpaCy model to use for sentence detection. Default is
<code>'en_core_web_sm'</code>.
None.
</li>
</ul>
<h4>Example usage:</h4>
<pre><code class="language-python">chunker = NlpSentenceChunking(model='en_core_web_sm')
<pre><code class="language-python">chunker = NlpSentenceChunking()
chunks = chunker.chunk("This is a sample text. It will be split into sentences.")
</code></pre>
</div>