Gold data normalization
This Business Process (BP) normalizes gold data values by doing the following:
- Removes extra spaces.
- Removes tabs and newlines.
Input
Format: CSV file
Structure: has a column that contains tagged XML/HTML for normalization. The 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