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

Date simplification technique is too simple #214

Open
stucka opened this issue Oct 18, 2023 · 1 comment
Open

Date simplification technique is too simple #214

stucka opened this issue Oct 18, 2023 · 1 comment

Comments

@stucka
Copy link
Contributor

stucka commented Oct 18, 2023

Several transformers try to grab the first hunk of text before a space to determine a date. That's not a great approach if that first hunk of text is too small to be a valid date and also too small to be a good quasi-unique identifier.

In New York, for example, there's an American Airlines entry for "2 /12 /2021" that comes in as simply "2", which could conflict with other bad entries.

If the first hunk is too small to be a date (e.g., 1/1/23 for six characters) the whole string should probably be passed for a match.

value = value.split()[0].replace(",", "").replace(";", "")
Could be something like:

patched= value.split()[0].replace(",", "").replace(";", "")
if len(patched) >= 6:
    value = patched

@stucka
Copy link
Contributor Author

stucka commented Oct 18, 2023

Ohio and New York appear to use something similar.

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

No branches or pull requests

1 participant