{"data":{"slug":"discovered-92535c1bf002a914029706bd07eeaf423d09aef8da04b552","title":"Nj Proofread","summary":"Proofread Arabic, English, or bilingual text (SRS, official submissions, manuals, UI strings). Detects hamza and taa-marbuta errors, Persian letters, invisible bidi characters, tatweel, mixed numerals, Latin punctuation inside Arabic.","url":"https:\/\/skillshunter.net\/skills\/discovered-92535c1bf002a914029706bd07eeaf423d09aef8da04b552","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-92535c1bf002a914029706bd07eeaf423d09aef8da04b552","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-92535c1bf002a914029706bd07eeaf423d09aef8da04b552.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-92535c1bf002a914029706bd07eeaf423d09aef8da04b552\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before running the scanner, convert `.docx` files to markdown using pandoc. For PDFs, use `pdf-structure.py` to extract structured text before scanning. Verify extracted Arabic text against the rendered PDF to avoid false positives caused by font issues during extraction.","instructions":"---\nname: nj-proofread\ndescription: 'Proofread Arabic, English or bilingual text (SRS, official submissions, manuals, UI strings). Catches hamza and taa-marbuta errors, Persian letters, invisible bidi characters, tatweel, mixed numerals, Latin punctuation inside Arabic. Triggers: proofread, review, \u062a\u062f\u0642\u064a\u0642, \u0645\u0631\u0627\u062c\u0639\u0629 \u0644\u063a\u0648\u064a\u0629, check the Arabic.'\n---\n\n# Proofreading Arabic and English\n\nArabic errors are largely invisible to the tools that catch English ones. A\nspellchecker flags \"recieve\"; nothing flags \u00ab\u0627\u0644\u062e\u062f\u0645\u0647\u00bb for \u00ab\u0627\u0644\u062e\u062f\u0645\u0629\u00bb, a Persian\n`\u06a9` typed where an Arabic `\u0643` belongs, or a zero-width character that Word\nleft behind and that quietly breaks every search for the word containing it.\n\nSo the work splits in two, and the split is the method:\n\n- **Mechanical faults** \u2014 countable, decidable from the codepoints alone.\n  `scripts\/scan.py` finds all of them, exhaustively, in one pass. Never hunt\n  for these by reading; reading misses invisible characters by definition.\n- **Faults of meaning** \u2014 grammar, register, agreement, word choice, and the\n  Arabic letter pairs whose correctness depends on the sentence rather than\n  the character. These need reading, and reading is where attention should go.\n\n## Start with the scanner\n\n```bash\npython scripts\/scan.py FILE [FILE...]     # human-readable, grouped by kind\npython scripts\/scan.py --json FILE        # machine-readable\n```\n\n`scan.py` exits 0 even with findings \u2014 gate on its \"N mechanical finding(s)\"\nline, not the exit code. And never write an Arabic check as a `grep` character\nclass: in Git Bash on this laptop `[^\u0621-\u064a]` silently matches nothing, so the\ncheck passes on text that is full of the fault (2026-10-15, QA KB translation).\nPut it in Python (`re`, `\u0600-\u06ff`) and prove it fails on a bad sample.\n\nIt reports invisible and bidi-control characters, tatweel, Persian\/Urdu\nletters, Latin punctuation inside Arabic, space before punctuation, doubled\nwords, multiple spaces, trailing whitespace, and mixed numeral systems.\n\nRun it before reading. It costs a second, it is exhaustive where a human is\nnot, and it clears the noise so the reading pass is about language.\n\nFor a `.docx` \u2014 most source documents here are Word \u2014 convert first, because\npandoc is installed and the alternative is guessing:\n\n```bash\npandoc -f docx -t markdown --wrap=none \"SRS - \u2026docx\" -o \/tmp\/doc.md\npython scripts\/scan.py \/tmp\/doc.md\n```\n\n## For a PDF, read its structure \u2014 never a flat text dump\n\n```bash\npython scripts\/pdf-structure.py FILE -o \/tmp\/doc.md   # tables, lists, layers\npython scripts\/pdf-structure.py FILE --layers         # just the layer report\npython scripts\/scan.py \/tmp\/doc.md                    # then the usual scan\n```\n\nA plain `pdftotext` dump flattens the document: table cells run together into\none line, list nesting disappears, and text on a hidden optional-content layer\nis absent entirely. Proofreading that dump means proofreading a different\ndocument from the one the reader sees \u2014 corrections land in the wrong cell, and\na whole layer goes unreviewed. This is the failure people know from applicant\ntracking systems reading a two-column CV as one column: the text was in the\nfile, and nothing asked for it.\n\n`pdf-structure.py` returns tables as markdown tables, keeps list markers and\nnesting, and reports every layer with whether it is visible by default. Its\nheader comment names what it found, including anything hidden \u2014 read that line\nbefore the body.\n\n**Two engines, and the split is not arbitrary.** All text comes from poppler;\npymupdf is used only for geometry and metadata and is never asked what the words\nsay. Measured on one nine-word Arabic sentence from a Cairo PDF:\n\n| engine | words recovered |\n| --- | --- |\n| pypdf | 0 \/ 9 |\n| pymupdf | 6 \/ 9 |\n| poppler (`pdftotext`) | **9 \/ 9** |\n\nmupdf and pdfium drop Arabic words silently. Two of them agreeing looks like\ncorroboration and is one shared bug \u2014 that is how a sound font came to be\nrecorded as corrupting text. If `pdftotext` is missing, the script stops rather\nthan fall back, because a quiet wrong answer is worse than no answer.\n\n## The trap: not every mangled word is a typo\n\n**Text extracted from a PDF can be corrupted by the PDF itself.** Certain\nArabic fonts displace letters inside words during extraction \u2014 the word looks\ncorrect on the page and comes out wrong when copied. \u00ab\u0645\u062a\u0637\u0644\u0628\u0627\u062a\u00bb extracting as\n\u00ab\u0645\u062a\u062a\u0637\u0644\u0628\u0627\u062a\u00bb is the documented example, and it was reported as a typo when the\ndocument was in fact spelled correctly.\n\nSo before correcting an Arabic word that looks misspelled in extracted text:\n\n1. Ask where the text came from. Copied out of a PDF? Suspect the font first.\n2. Look at the *rendered* page \u2014 the screenshot or the PDF itself \u2014 not the\n   extracted string.\n3. If the page is right and the extraction is wrong, the defect is in the PDF\n   pipeline, not the prose. Say so; correcting the text would be fixing the\n   wrong artefact and would leave the real fault shipping.\n\nThe `nj-pdf-typography` skill covers which faces survive extraction and which do\nnot. Amiri round-trips whole words; some widely used UI faces do not.\n\n## The reading pass\n\nRead `references\/arabic-checks.md` for the Arabic rules that need judgement \u2014\nhamza forms, \u0629\/\u0647, \u0649\/\u064a, agreement, and the formal-register conventions that\nministry and client documents are held to. Read it whenever the text under\nreview contains Arabic; the rules are specific and not worth reconstructing\nfrom memory.\n\nFor English, the ordinary things apply, with two that matter more in\ntranslated text than in original writing:\n\n- **Calques.** Arabic-to-English drafts carry Arabic sentence shape:\n  \"It is to be noted that the system will be doing the validation\" for \"The\n  system validates\". Prefer the plain verb.\n- **Terminology drift.** A term translated three ways across one document \u2014\n  \"request\", \"application\", \"submission\" for \u00ab\u0637\u0644\u0628\u00bb \u2014 reads as three different\n  things to a reader who does not have the Arabic. Fix by choosing one and\n  applying it, and say which you chose.\n\n## Bilingual documents\n\nWhen Arabic and English appear as a pair \u2014 a manual, a form, a UI string\ntable \u2014 the pair is the unit of review, not each language alone:\n\n- **Do both sides say the same thing?** A correction to one side that leaves\n  the other stale is worse than the original error, because now the document\n  contradicts itself.\n- **Do numbers, dates, IDs and product names match exactly** across the two?\n  These are where silent divergence hides, and they are checkable.\n- **Latin runs inside Arabic** \u2014 API, PROJ, Playwright, a URL \u2014 should be\n  wrapped in directional isolates (`U+2066\u2026U+2069`) or the equivalent markup.\n  Without isolation, adjacent punctuation jumps to the wrong end of the run\n  when rendered. The scanner reports existing isolates so you can see whether\n  a document uses them; it does not insert them, because whether a run needs\n  one depends on what surrounds it.\n\n## Reporting\n\nCorrect the text, then account for it. A returned document with silent edits\nis impossible to check and impossible to trust.\n\nGroup by kind rather than walking line by line, since one root cause usually\nproduces many instances:\n\n```markdown\n## Mechanical (from scan.py)\n- 14 \u00d7 zero-width characters removed (pasted from Word)\n- 3 \u00d7 Latin comma \u2192 Arabic comma \u00ab\u060c\u00bb\n- Mixed numerals: 27 Western, 4 Arabic-Indic \u2192 standardised on Western\n\n## Language\n- \u00ab\u0627\u0644\u062e\u062f\u0645\u0647\u00bb \u2192 \u00ab\u0627\u0644\u062e\u062f\u0645\u0629\u00bb (taa marbuta) \u00d76\n- \u00ab\u0625\u0646 \u0627\u0644\u0637\u0644\u0628\u00bb \u2192 \u00ab\u0623\u0646 \u0627\u0644\u0637\u0644\u0628\u00bb \u2014 reported speech, not emphasis (line 42)\n- \"request\"\/\"application\" both used for \u00ab\u0637\u0644\u0628\u00bb \u2192 standardised on \"request\"\n\n## Not corrected \u2014 needs your decision\n- Line 88 \u00ab\u0627\u0644\u0645\u0633\u062a\u062d\u0636\u0631\u00bb vs \u00ab\u0627\u0644\u0645\u0646\u062a\u062c\u00bb \u2014 both defensible; the rest of the document\n  uses \u00ab\u0627\u0644\u0645\u0633\u062a\u062d\u0636\u0631\u00bb, but the client's own letter uses \u00ab\u0627\u0644\u0645\u0646\u062a\u062c\u00bb\n```\n\nThat last section matters. Where a change is a judgement about house style,\nclient preference, or meaning you cannot verify, propose it and leave it \u2014 do\nnot quietly decide on the author's behalf. In a document going to a ministry,\nan unrequested wording change can alter what was committed to.\n\n## When the text is not a file\n\nFor a paragraph pasted into the conversation, the same order applies \u2014 write\nit to a temp file, scan it, then read it. It is tempting to skip the scanner\nfor three lines, but zero-width characters and Persian letters are exactly\nwhat a paste out of Word carries, and exactly what reading will not reveal.\n\n","use_cases":["Proofreading Arabic and English text in SRS documents","Checking for invisible bidi characters and Persian letters in UI strings","Validating Arabic text extracted from PDFs","Ensuring correct use of hamza and taa-marbuta in official submissions"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/NJ-Burrito\/NJ-Kit\/blob\/2644ffdccb94c9eb0a65b23624abe9795e005faa\/nj-plugin\/skills\/nj-proofread\/SKILL.md","source_commit":"2644ffdccb94c9eb0a65b23624abe9795e005faa","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:52:02.000000Z","updated_at":"2026-11-29T10:53:39.000000Z","seo_title":"Nj Proofread - Arabic and English Text Proofreading Tool","seo_description":"Proofread Arabic and English text with Nj Proofread. Detects invisible characters, bidi issues, Persian letters, and more. Ensures accuracy in SRS, official submissions,,","seo_keywords":["Arabic proofreading","bidi character detection","Persian letter check","PDF text extraction","hamza and taa-marbuta validation"]}}