Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPARKNLP-924: DocumentCharacterTextSplitter #14035

Conversation

DevinTDHa
Copy link
Member

Description

This PR introduced the DocumentCharacterTextSplitter which allows users to split large documents into smaller chunks.

DocumentCharacterTextSplitter takes a list of separators. It takes the separators in order and
splits subtexts if they are over the chunk length, considering optional overlap of the chunks.

Motivation and Context

This will allow users manage large texts better to feed into e.g. language models

How Has This Been Tested?

New and old tests are passing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Code improvements with no or little impact
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING page.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DevinTDHa DevinTDHa added the new-feature Introducing a new feature label Oct 21, 2023
@DevinTDHa DevinTDHa self-assigned this Oct 21, 2023
@maziyarpanahi maziyarpanahi changed the base branch from master to release/514-release-candidate October 26, 2023 11:58
@maziyarpanahi maziyarpanahi merged commit 52fdaf2 into JohnSnowLabs:release/514-release-candidate Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Introducing a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants