bayan-api / src /nlp

Commit History

Fix: Enhance Jazm and Nasb logic with camel_tools for Af'al Khamsa and defective verbs
bbfe996

Bayan AI commited on

UI/UX: Add Quran standalone tab, summarize textarea, floating selection bar, fix clear editor, remove duplicate button
70184c4

youssefreda9 commited on

FIX-47: Expand hamza whitelist with verb+pronoun forms
dd35746

youssefreda9 commited on

FIX-44: OOV cleanup pass between spelling and grammar stages
4608bcd

youssefreda9 commited on

FIX-38/39 + Layer 1/2/3: Benchmark normalization + spelling safety + grammar rules
eae5d36

youssefreda9 commited on

FIX-33b: Protect second+third preposition regexes with blocklist
17a3ac2

youssefreda9 commited on

FIX-36: Merge punctuation into grammar when they overlap same span
f5d7f0e

youssefreda9 commited on

FIX-33/34/35: Fix infinite loop — grammar corruption + spelling conflict
4616185

youssefreda9 commited on

Fix grammar rules output log — remove hardcoded ... truncation marker
f4e59e5

youssefreda9 commited on

Phase 14c: Fix FIX-31 whitespace bug + fix misleading log truncation
ca212fd

youssefreda9 commited on

Phase 14b: Fix spelling punct hallucination + cross-stage overlap
cfb4439

youssefreda9 commited on

Phase 14: Fix StageLocker over-locking + PatchSet overlap resolution
9674032

youssefreda9 commited on

Merge punctuation_rules V1+V2: V2 threshold+fallback, V1 softened exclamation guard for short texts
c1f8f9f

youssefreda9 commited on

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

Bayan AI commited on

Feat: Add demonstrative and noun-adjective dual/plural agreement rules
19a801d

Bayan AI commited on

Fix: Prevent conditional sentences rule from overcorrecting 'إن' and 'من' by requiring the subsequent word to be a verb
4c96469

Bayan AI commited on

Fix: Preserve input punctuation during grammar correction
54052f7

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 12: Spelling pipeline integration + Benchmark integrity fixes
2883342

youssefreda9 commited on

FIX-26: Reject punct substitution when original has punct
175fc9d

youssefreda9 commited on

HOTFIX: Remove broad preposition/nasb regex rules — caused Hallucination 0%, +38 FP
2fe1569

youssefreda9 commited on

Critical: Isolate grammar rules in try/except so regex fallback ALWAYS runs
722789f

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

fix: Apply hamza+ta-marbuta corrections AFTER validation steps to prevent reversion
34789e9

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

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

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

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

youssefreda9 commited on

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

youssefreda9 commited on

fix(autocomplete): replace beam search with sampling for diverse GPT-2 predictions
09bdb42

youssefreda9 commited on

fix(autocomplete): GPT-2 now generates complete words, not BPE subword tokens
a5fba61

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: Grammar Gradio client retry with exponential backoff (3 attempts, 2s/4s/8s)
f622abb

youssefreda9 commited on

fix: Grammar retry on rate-limit + cursor position after correction
4bde1ea

youssefreda9 commited on

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

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

fix: Grammar rules false positive - الامتحان was incorrectly matched - Increased minimum stem length from 2 to 4 in fix_prepositions_advanced - Prevents root-level ان endings (الامتحان, الإنسان) from being treated as grammatical ون/ان
3f4dd4a

youssefreda9 commited on

feat: NLP-2 Grammar Integration — dependency-aware pipeline - Add grammar_rules.py (ArabicGrammarGuard from Grammer_Rules.py with camel-tools) - Add grammar_service.py (lazy-loaded Gradio Client + rules pipeline) - Wire /api/grammar endpoint to real grammar service - Wire /api/analyze Step 2 to grammar (receives AraSpell output) - Update /api/health to report grammar status - Add gradio_client to requirements.txt - Add camel_data download to Dockerfile - Frontend unchanged (already supports grammar-error yellow highlighting)
29371b1

youssefreda9 commited on

fix: PDF dropdown visible + verify spelling context + araspell audit - Fix summary export dropdown clipping (overflow: visible + opens upward) - Verify: use_contextual=True in araspell_service.py (line 83) ✓ - Verify: ContextualCorrector fully initialized and used in pipeline ✓ - Verify: All araspell_rules.py classes used: AraSpellPostProcessor, ErrorClassifier, RulesBasedCorrector, OutputValidator, VocabularyManager, WordAligner, SplitMergeSpecialist, EditDistanceCorrector, ContextualCorrector, ArabicSpellChecker ✓ - Fix misleading comment about contextual=False
399baae

youssefreda9 commited on

feat: Professional editor UI redesign - 3-column layout (docs | editor | sidebar) - Documents panel always visible on desktop - Import/export moved to left sidebar - Removed CTA button from nav - Replaced all emojis with SVG icons - Clean toolbar with separator - Mobile: docs stay as overlay sidebar
040f556

youssefreda9 commited on