Miss period after parent-child chunk #881

Closed
opened 2026-02-16 10:20:50 -05:00 by yindo · 1 comment
Owner

Originally created by @leslie2046 on GitHub (Dec 18, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Plugin version

0.0.7

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

new 5.txt

Image

✔️ Error log

No response

Originally created by @leslie2046 on GitHub (Dec 18, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Plugin version 0.0.7 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce [new 5.txt](https://github.com/user-attachments/files/24236518/new.5.txt) <img width="1905" height="748" alt="Image" src="https://github.com/user-attachments/assets/f9d429f6-db26-4fbf-86f1-0526a4af46b0" /> ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:20:50 -05:00
yindo closed this issue 2026-02-16 10:20:50 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 18, 2025):

The missing period after parent-child chunking is caused by the cleaning logic in the plugin. Specifically, the _clean_page_content method in the ParentChildIndexProcessor class strips leading periods (both . and ) from each chunk. If the text splitter leaves a period at the start of a chunk, this method removes it, resulting in the missing punctuation you observed. This behavior is hardcoded and affects any language or document format where a chunk starts with a period after splitting. You can see this in the code here.

If you need to preserve periods at chunk boundaries, you could modify or remove the line in _clean_page_content that strips leading periods. There are no configuration options for this behavior in the current version.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 18, 2025): <!-- Answer --> The missing period after parent-child chunking is caused by the cleaning logic in the plugin. Specifically, the `_clean_page_content` method in the `ParentChildIndexProcessor` class strips leading periods (both `.` and `。`) from each chunk. If the text splitter leaves a period at the start of a chunk, this method removes it, resulting in the missing punctuation you observed. This behavior is hardcoded and affects any language or document format where a chunk starts with a period after splitting. You can see this in the code [here](https://github.com/langgenius/dify-official-plugins/blob/6ec14c4625f9095fe84ea7a616f5a119fc04627a/tools/parent_child_chunk/tools/index_processor/parent_child_index_processor.py#L16-L92). If you need to preserve periods at chunk boundaries, you could modify or remove the line in `_clean_page_content` that strips leading periods. There are no configuration options for this behavior in the current version. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f69023f9-b888-43fc-8646-369ccf590396?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20missing%20period%20after%20parent-child%20chunking%20is%20caused%20by%20the%20cleaning%20logic%20in%20the%20plugin.%20Specifically%2C%20the%20%60_clean_page_content%60%20method%20in%20the%20%60ParentChildIndexProcessor%60%20class%20strips%20leading%20periods%20%28both%20%60.%60%20and%20%60%E3%80%82%60%29%20from%20each%20chunk.%20If%20the%20text%20splitter%20leaves%20a%20period%20at%20the%20start%20of%20a%20chunk%2C%20this%20method%20removes%20it%2C%20resulting%20in%20the%20missing%20punctuation%20you%20observed.%20This%20behavior%20is%20hardcoded%20and%20affects%20any%20language%20or%20document%20format%20where%20a%20chunk%20starts%20with%20a%20period%20after%20splitting.%20You%20can%20see%20this%20in%20the%20code%20%5Bhere%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/6ec14c4625f9095fe84ea7a616f5a119fc04627a/tools/parent_child_chunk/tools/index_processor/parent_child_index_processor.py%23L16-L92%29.%0A%0AIf%20you%20need%20to%20preserve%20periods%20at%20chunk%20boundaries%2C%20you%20could%20modify%20or%20remove%20the%20line%20in%20%60_clean_page_content%60%20that%20strips%20leading%20periods.%20There%20are%20no%20configuration%20options%20for%20this%20behavior%20in%20the%20current%20version.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2287)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#881