Skip to content

Corrects boolean check for ignore_alpha variable.#389

Open
jamie-lemon wants to merge 1 commit into
mainfrom
ignore-alpha-fix
Open

Corrects boolean check for ignore_alpha variable.#389
jamie-lemon wants to merge 1 commit into
mainfrom
ignore-alpha-fix

Conversation

@jamie-lemon

Copy link
Copy Markdown
Collaborator

In pymupdf_rag.py - we have the ignore_alpha variable defined as follows:

ignore_alpha: (bool, True) ignore text with alpha = 0 (transparent).

But then later:

parms.accept_invisible = (
            page_is_ocr(page) or ignore_alpha
        )  # accept invisible text

I think the logic here is to check if ignore_alpha is False is correct.

@jamie-lemon

Copy link
Copy Markdown
Collaborator Author

I'm reading this as "if we ignore alpha text (True) then that means we would ignore invisible text". Please let me know if my logic is flawed!

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.

1 participant