pymupdf / RAG

RAG (Retrieval-Augmented Generation) Chatbot Examples Using PyMuPDF
https://pymupdf.readthedocs.io/en/latest/pymupdf4llm
GNU Affero General Public License v3.0
282 stars 53 forks source link

Bug in `is_significant` function #88

Closed dantetemplar closed 3 weeks ago

dantetemplar commented 1 month ago

In pymupdf_rag.py:196 "q" stands for Quad type but it should be "qu" I guess. That leads to runtime error.

https://github.com/pymupdf/RAG/blob/8c0f5009f3d121a9679445b7b551318d77dd967c/pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py#L196

Stephen-S-H commented 1 month ago

I can confirm this error, and that changing this line to elif itm[0] == "qu": does fix the issue. I've changed it to this just to be safe for the time being: elif itm[0] in ("q", "qu"): # quad

bhashithe-air commented 1 month ago

Thanks both, yes changing to 'qu' worked! Can send a PR if needed.

bhashithe-air commented 1 month ago

@dantetemplar #93 seems to do the same fix, so i closed mine.

JorjMcKie commented 3 weeks ago

Fixed in v0.0.11.