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

[LLM pipeline] Update text normalization component #335

Merged
merged 9 commits into from
Aug 16, 2023
Merged

[LLM pipeline] Update text normalization component #335

merged 9 commits into from
Aug 16, 2023

Conversation

mrchtr
Copy link
Contributor

@mrchtr mrchtr commented Aug 3, 2023

Add minor improvements to the text normalization component. Mainly based on the work of Penedo et al

Quality can be improved by removing specific patterns in single lines:

We analyse documents line-by-line, and
discard or edit the lines based on the following rules:
• If it is mainly composed of uppercase characters (discard);
• If it is only composed of numerical characters (discard);
• If it is a counter (e.g. 3 likes) (discard);
• If it only contains one word (discard);

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrchtr!

Changes to the component look good. Left some comments on the testing strategy.

components/text_normalization/tests/utils_test.py Outdated Show resolved Hide resolved
components/text_normalization/fondant_component.yaml Outdated Show resolved Hide resolved
components/text_normalization/src/main.py Outdated Show resolved Hide resolved
components/text_normalization/src/utils.py Outdated Show resolved Hide resolved
components/text_normalization/tests/component_test.py Outdated Show resolved Hide resolved
components/text_normalization/tests/conftest.py Outdated Show resolved Hide resolved
Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you re-add a component test in this PR as well?

components/text_normalization/Dockerfile Show resolved Hide resolved
Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrchtr!

For the tests, I would go for option 1. It is simple and readable. I don't think the limited value provided by the abstractions warrants the extra complexity / "magic".

components/text_normalization/Dockerfile Show resolved Hide resolved
@mrchtr
Copy link
Contributor Author

mrchtr commented Aug 15, 2023

For the tests, I would go for option 1. It is simple and readable. I don't think the limited value provided by the abstractions warrants the extra complexity / "magic".

Alright. I have reduced the code to option 1.

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RobbeSneyders RobbeSneyders merged commit e3e078d into ml6team:main Aug 16, 2023
5 checks passed
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
Add minor improvements to the text normalization component. Mainly based
on the work of [Penedo et al ](https://arxiv.org/pdf/2306.01116.pdf)

Quality can be improved by removing specific patterns in single lines:
> We analyse documents line-by-line, and
discard or edit the lines based on the following rules:
• If it is mainly composed of uppercase characters (discard);
• If it is only composed of numerical characters (discard);
• If it is a counter (e.g. 3 likes) (discard);
• If it only contains one word (discard);
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