bayan-api / src /app.py

Commit History

Fix: TerminalPunctuationGuard for short phrases and comprehensive Nasb/Jazm grammar rules fixes
31a6db1
Running

Bayan AI commited on

Refactor: Remove obsolete IVtoOOV filter to prevent False Negatives
dbc8941

Bayan AI commited on

Fix: Add missing dual and plural IVtoOOV bypass rules in app.py
100db1e

Bayan AI commited on

Fix: Reorder Jaccard filter in app.py to run after evaluating grammar bypass rules
44c30d6

Bayan AI commited on

Fix: Strip trailing punctuation in grammar bypass rule to handle words at the end of sentences
391a5b3

Bayan AI commited on

Fix: Allow gender prefix swap (ي/ت) during feminine plural present tense bypass
b55244c

Bayan AI commited on

Fix: Add bypass rule for present tense feminine plural to prevent IVtoOOV rejection
401d5ab

Bayan AI commited on

Phase 11.5: Adversarial diagnostic + 4 critical pipeline fixes
57104c1

youssefreda9 commited on

Phase 11: Hierarchical StageLocker — grammar overrides spelling locks
6f1ed4e

youssefreda9 commited on

Phase 13: Fix punctuation terminal injection filter (context-aware Rule 0)
c830869

Mohamed Atef commited on

Phase 13: Fix spelling filter blind spots + eager model loading
38a1924

Mohamed Atef commited on

Phase 12: Spelling pipeline integration + Benchmark integrity fixes
2883342

youssefreda9 commited on

Phase 11: Inline telemetry in API response
404f92d

youssefreda9 commited on

Phase 11: Telemetry instrumentation + OffsetMapper tests
6319518

youssefreda9 commited on

FIX-27: Grammar structured data + hallucination protection
609c035

youssefreda9 commited on

FIX-25: Block grammar punct spacing (حالك؟→حالك ؟)
c8cc451

youssefreda9 commited on

FIX-24: Block grammar model punct stripping (البلاد.→البلاد)
7954757

youssefreda9 commited on

FIX-23: Block grammar model tanween removal + HF log fetcher
d3a32e2

youssefreda9 commited on

CRITICAL FIX: _DIRECTIONAL_BLOCKS was local scope → NameError in grammar diff filter
9cae8f8

youssefreda9 commited on

Hotfix: Revert pronoun-h guard to ته-only (was breaking ta_marbuta), add directional blocks for عمله/لسانه/بيته/كتابه
b62e8ec

youssefreda9 commited on

Phase 13: Grammar SV/gender whitelist, preposition/nasb regex, pronoun-h guard
e909fa9

youssefreda9 commited on

Phase 12: Fix 6 batches — grammar pipeline bypass, religious/structured protection, punct rearrangement, SV/gender agreement
015c7b7

youssefreda9 commited on

Phase 11: Master Bug Fix — 23 fixes across 8 files
095e270

youssefreda9 commited on

Phase 8: Fix all critical bugs from adversarial validation
1159492

youssefreda9 commited on

feat: dialect-to-MSA conversion — backend API + frontend + Docker model cache
6222cc6

youssefreda9 commited on

fix: better quran import error logging to diagnose HF failure
4393710

youssefreda9 commited on

feat: Quran verification & translation endpoint + modal UI (13 languages)
6963862

youssefreda9 commited on

revert: restore backend to 1a76471, keep all UI/UX improvements
e658303

youssefreda9 commited on

revert: restore backend/model files to cf07939 state, keep UI/UX changes only
01b11d4

youssefreda9 commited on

fix: accept ص↔س/ض↔ظ/ذ↔ز spelling corrections (المدرصة→المدرسة), fix punctuation dup regex
d4af364

youssefreda9 commited on

fix: grammar/quran icons different, tooltip no strikethrough, punctuation no duplicate dots
400e996

youssefreda9 commited on

UI: nav logo, bayyinah hover, quran icon, hero autocomplete shadow, clean tooltip, fix punctuation dup + hamza كان
8804f87

youssefreda9 commited on

fix: block grammar كان→كأن + punctuation mid-word split (الدفت.ر)
b5890c0

youssefreda9 commited on

feat: P1-P3 all 8 items - ta marbuta fix, UI feedback, caching, rate limiting, unit tests
0678259

youssefreda9 commited on

fix: block grammar model from removing/normalizing punctuation marks
3bcf6af

youssefreda9 commited on

feat: P1-P3 improvements + auto re-analyze after apply
23c955d

youssefreda9 commited on

fix: Pipeline hardening - 37 bugs + 10 edge cases (Round 1 + Round 2)
e7915b0

youssefreda9 commited on

fix(spelling): strict ortho-only filter prevents word corruption
21d680b

youssefreda9 commited on

debug(punctuation): enhanced lock logging to show which owner blocks punctuation
6dc7ac1

youssefreda9 commited on

fix(punctuation): allow pure punctuation changes through stage lock
9aa2ce8

youssefreda9 commited on

feat(autocomplete): threshold=0.05 + max 3 suggestions
0a1ff39

youssefreda9 commited on

fix(autocomplete): true context awareness - GPT-2 now adds own candidates + cache key uses 5 words
9cb9b25

youssefreda9 commited on

feat(NLP-4): AutoComplete integration — hybrid bigram + GPT-2
7394487

youssefreda9 commited on

fix(critical): stop spelling from corrupting correct words + fix pronoun agreement + reject hallucinations
a16af4a

youssefreda9 commited on

fix: re-label grammar spelling fixes + handle prefix in hamza whitelist
79407d3

youssefreda9 commited on

fix: all model bugs — S1 S2 S3 G1 P1 (6 fixes across 4 files)
e68c40c

youssefreda9 commited on

fix: QA sweep — 6 issues resolved (sidebar chips, corrected field, input sanitization, punc cap, docs, tests)
53a22ae

youssefreda9 commited on

feat: Pipeline Hardening v3.3 — stage ownership, punctuation safety, UUID migration
a9630ec

youssefreda9 commited on

feat: NLP-3.5 Hardening Sprint — Performance + Overlap Resolver TASK 2: Per-stage timing instrumentation (spelling_ms, grammar_ms, punctuation_ms, total_ms) TASK 3: Smart text processing — skip AraSpell for texts > 300 chars TASK 4+5: Global overlap resolver with priority system grammar(3) > punctuation(2) > spelling(1) > autocomplete(0) Full span collision detection (exact + partial overlaps) TASK 6: AutoComplete priority hook prepared (priority=0)
5745dea

youssefreda9 commited on

feat: NLP-3 PuncAra-v1 Integration — Local punctuation model - Created src/nlp/punctuation/ package (rules + service) - Extracted from PuncAra.py: preprocessing, postprocessing, chunking logic - PunctuationChecker: lazy-loaded EncoderDecoderModel from bayan10/PuncAra-v1 - Wired into /api/analyze as Step 3 (Spelling -> Grammar -> Punctuation) - Updated /api/punctuation standalone endpoint - Updated /api/health to report punctuation status - Dockerfile pre-downloads PuncAra-v1 weights during build - Increased gunicorn timeout to 300s for full pipeline
8bea99d

youssefreda9 commited on