feat: Add ChineseDocumentSplitter#9494
Closed
davidsbatista wants to merge 28 commits intomainfrom
Closed
Conversation
- Removed notebook and original_pipeline.png - Added release note YAML file in notes/ - Reverted config.yaml - Implemented lazy import for hanlp - Removed main guard block from module
… and fix lint issues
Collaborator
Pull Request Test Coverage Report for Build 15468825551Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
7 tasks
Member
|
Closing this PR because we decided to move it to haystack-core-integrations: deepset-ai/haystack-core-integrations#1943 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
No related issue. This PR originated from a community discussion about improving Chinese document splitting support.
Follow up on #9453 by @mc112611
There was a notebook to show how to use the new component in the forked repository: https://github.com/mc112611/haystack/blob/307f8340b2e1a9104efe4e33d8c1885d17143c36/examples/chinese_RAG_test_haystack_chinese.ipynb
Proposed Changes
This PR introduces a
ChineseDocumentSplitterthat supports accurate sentence and paragraph splitting for Chinese documents. It leverages the HanLP library for Chinese linguistic analysis, including sentence segmentation and tokenization.How did you test it?
newly added tests. We can also use the notebook mentioned above for testing but haven't done that yet with the latest version of the code.
Notes for the reviewer
We still plan to make a couple of changes:
warm_upmethod. Still to decide whether thiswarm_upshould also call super.warm_upself.language == englishChecklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.