Gold data normalization
This Business Process normalizes gold data values by doing the following:
- Removes extra spaces.
- Removes tabs and newlines.
Input
Format: CSV file
Structure: Has column that contains tagged XML/HTML for normalization. Column name by default is tagged_text, it can be changed on the BP params step.
Implemented logic
- Reads XML (HTML) declaration as a string.
- Removes all artifacts (blank spaces, tabs, new lines) from the string.
- Converts the string to a Document format.
- Recursively goes through the Document and fixes all data-value attributes (removes blank spaces, tabs, new lines).
- Converts the Document to a string.
- Overwrites respective values in an input file.
Output
Format: CSV file.
Structure: same as input