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

Issue 494: Add normalization to shrink consecutive whitespace to a single space #550

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

rminsil
Copy link
Collaborator

@rminsil rminsil commented Oct 5, 2024

This PR adds very basic normalization for extract strings to shrink consecutive whitespace characters to a single space, e.g. "a b \t\t c" -> "a b c".

It addresses this requirement from Michael: (see #494 (comment)):

Convert multiple consecutive spaces to a single space

Note this goes a little further and will pick up any whitespace (tabs, carriage returns, bells) and convert it to a regular space character. I haven't seen cases of this yet - just being cautious.

The only remaining requirement for issue 494 will be:

Correct inconsistent spacing around punctuation

then issue 494 can be closed. Future requirements would go onto a different issue. I am waiting for a definition of what is considered "punctuation" before implementing this one.

Note this PR is built off #549 and will need to be rebased once 549 is merged.


This change is Reviewable

@rminsil rminsil requested a review from ddaspit October 5, 2024 12:39
@rminsil rminsil linked an issue Oct 5, 2024 that may be closed by this pull request
Base automatically changed from issue-494-add-file-IO-for-normalize-script to master October 10, 2024 07:57
@rminsil rminsil force-pushed the issue-494-shrink-consecutive-spaces-to-single-space branch from 1cd44ff to c9b3f7d Compare October 10, 2024 07:58
@rminsil rminsil merged commit 0d5b04c into master Oct 10, 2024
@rminsil rminsil deleted the issue-494-shrink-consecutive-spaces-to-single-space branch October 10, 2024 07:58
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.

Add data transformation and cleaning to XRI etl script
1 participant