[wishlist]: annotate PDFs
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start by reading the codespell project entry points and tests to understand how files are currently checked; this issue names no specific files or tests. Then evaluate the proposed PDF text-extraction and annotation libraries against the desired workflow. Done would require a defined, tested way to check PDF text and annotate identified misspellings, but the issue does not specify expected behavior.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
codespell is so great, would have been nice if we could get it to check and annotate text in other media, in particular in PDFs. Here is some background information from chatting with ChatGPT (adding references):
Yes, some of these libraries can be used to extract text along with their locations from a PDF, which would allow you to add annotations on mistyped words or similar tasks. The two most suitable libraries for this purpose are:
-
PDFMiner: PDFMiner (dead, community fork: https://github.com/pdfminer/pdfminer.six) is especially powerful for this task. It allows you to extract not just the text but also detailed information about the text layout, including the position of each character. This can be very useful if you want to find specific words and their locations for annotation purposes.
-
PyMuPDF (https://github.com/pymupdf/PyMuPDF) (Fitz): This is another library that's highly effective for extracting text with layout information. PyMuPDF provides detailed information about each text block, line, and even individual characters, including their positions on the page.
Both of these libraries will let you extract text in a way that retains information about where each piece of text is located on the page. You can then use this information to target specific words or phrases for annotation.
After extracting the text and its location, you can use a library like PyPDF2 or ReportLab to add annotations or highlight the text at the identified locations. This two-step process (text extraction with PDFMiner or PyMuPDF and annotation with PyPDF2 or ReportLab) can be quite effective for tasks like marking typos or adding notes to specific sections of text in a PDF document.
- Vorherrschende Sprache
- Python
- Sterne
- 2.4k
- Forks
- 531
- Ø Merge
- 15 Std. 55 Min.
- Gemergte PRs (30 T.)
- 17
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codespell-project/codespell
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
codespell-project/codespell#3997 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
codespell-project/codespell#3965 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add "marcos"Evtl. vergeben @ekanshul hat das vor 20 Tagen übernommen. Offendictionary
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
codespell-project/codespell#3920 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
question
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
codespell-project/codespell#4005 ·
Maintainer antworten meist innerhalb von 1 Tag
-
duplicate question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
codespell-project/codespell#3998 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codespell-project/codespell
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationEvtl. vergeben @muskan-creates352 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
mllam/neural-lam#848 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
infra
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
fab-geocommuns/RNB-coeur#1166 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
deepspeedai/DeepSpeed#8951 ·
Maintainer antworten meist innerhalb von 2 Tagen