Skip to content

allow negative values for floats #10

@wadqc

Description

@wadqc

When converting string to float, negative values are filtered out in the regex in line 100 of ocr_lib.py
newtxt = re.sub(r'[^\d.]+', '', txt)

To allow negative values, add "| -" to the regex:
newtxt = re.sub(r'[^\d.|-]+', '', txt)

Another option is to keep the regex as is, but make it optionally configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions