Skip to content

[feat]: add CleanTagsPreExtractor#278

Merged
yogacc33 merged 4 commits intoccprocessor:devfrom
e06084:dev
Mar 7, 2025
Merged

[feat]: add CleanTagsPreExtractor#278
yogacc33 merged 4 commits intoccprocessor:devfrom
e06084:dev

Conversation

@e06084
Copy link
Copy Markdown
Collaborator

@e06084 e06084 commented Mar 6, 2025

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

  1. 增加了HTMLFileFormatCleanTagsPreExtractor类用来处理自定义的需要去除的隐藏节点;
  2. 使用方法:pre_extractor中开启:llm_web_kit.extractor.html.pre_extractor.HTMLFileFormatCleanTagsPreExtractor;
  3. 新增自定义需要删除的tag,在llm_web_kit/extractor/config.py中INVISIBLE_TAGS添加;

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here and update the documentation.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects.
  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #278      +/-   ##
==========================================
- Coverage   90.68%   89.24%   -1.44%     
==========================================
  Files         116       81      -35     
  Lines        6914     5506    -1408     
==========================================
- Hits         6270     4914    -1356     
+ Misses        644      592      -52     
Files with missing lines Coverage Δ
llm_web_kit/extractor/config.py 100.00% <100.00%> (ø)
llm_web_kit/extractor/html/magic_html/config.py 100.00% <ø> (ø)
llm_web_kit/extractor/html/pre_extractor.py 93.93% <100.00%> (ø)
llm_web_kit/libs/html_utils.py 93.40% <100.00%> (+0.81%) ⬆️

... and 49 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread llm_web_kit/extractor/config.py Outdated
@yogacc33
Copy link
Copy Markdown
Contributor

yogacc33 commented Mar 7, 2025

HTMLFileFormatCleanTagsPreExtractor 是extractor全局的操作吗,需要在test_extractor_chain.py和test_extractor_chain_normal.py中测试吗?

@e06084
Copy link
Copy Markdown
Collaborator Author

e06084 commented Mar 7, 2025

HTMLFileFormatCleanTagsPreExtractor 是extractor全局的操作吗,需要在test_extractor_chain.py和test_extractor_chain_normal.py中测试吗?

最好需要,我来加一下

@e06084
Copy link
Copy Markdown
Collaborator Author

e06084 commented Mar 7, 2025

HTMLFileFormatCleanTagsPreExtractor 是extractor全局的操作吗,需要在test_extractor_chain.py和test_extractor_chain_normal.py中测试吗?

测试用例加好了,帮忙再review一下哈 @yogacc33

@yogacc33 yogacc33 merged commit 620f5e2 into ccprocessor:dev Mar 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants