Commit ·
b366dff
0
Parent(s):
Initial commit: repository skeleton and folder READMEs
Browse filesFiles changed (6)
- .gitattributesAdded+3
- .gitignoreAdded+32
- LICENSEAdded+21
- README.mdAdded+32
- requirements.txtAdded+8
- src/README.mdAdded+55
123quran_master.db filter=lfs diff=lfs merge=lfs -textextension/assets/icons/fab_logo.png filter=lfs diff=lfs merge=lfs -text*.png filter=lfs diff=lfs merge=lfs -text1234567891011121314151617181920212223242526272829303132# Python__pycache__/*.py[cod]*.pyo*.pyd
# Environment.env.env.*
# Data and models (do not commit large files)data/models/output/
# PyTorch*.pt*.pth
# VS Code / IDE.vscode/.idea/
# OS files.DS_StoreThumbs.db
# Jupyter.ipynb_checkpoints/
# Logs*.log123456789101112131415161718192021MIT License
Copyright (c) 2025 Your Organization
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.1234567891011121314151617181920212223242526272829303132# Arabic Grammarly (project)
Project overview
This repository contains the initial skeleton for an Arabic grammar & writing assistant (like Grammarly) project. It includes placeholders for data, models, and source code, plus configuration and dependency files. Use this repo as the single source-of-truth for team contributions.
Key features you may implement here
- Arabic spelling and grammar checking- Style / clarity suggestions for Modern Standard Arabic (MSA) and dialects- Sentence rewriting and paraphrasing suggestions- Plagiarism or similarity checks (optional)- Integration with web UI / browser extension / API
Repository layout
- `data/` — place raw and processed datasets (LANS, corpora, etc.). See `data/README.md` for details.- `models/` — store training checkpoints and exports (do NOT commit large binary files). See `models/README.md`.- `src/` — source code (training scripts, inference API, preprocessing). See `src/README.md`.- `requirements.txt` — Python dependencies for the project.- `.env.example` — template for environment variables.- `.gitignore` — sensible defaults for this project.
Contributing notes
- Keep large datasets and model weights out of Git (use cloud storage or Git LFS / DVC / Hugging Face Hub).- Add tests in `src/tests/` and keep the public API stable.- Use small, focused pull requests that include a short description and test(s) if applicable.
Contact
If you have questions about where to add files or how to name things, ask in the team chat and follow the README inside each folder for more guidance.12345678transformerstorchdatasetscamel-toolssentencepiecescikit-learnnumpypandas12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455# src/ — source code
Purpose
All core project code should live in `src/`: data loaders, preprocessing, training scripts, model definitions, and inference API.
Suggested layout
- `src/app.py` — lightweight Flask/FastAPI app for inference and testing- `src/train.py` — training orchestration (argument parsing, checkpointing)- `src/evaluate.py` — evaluation scripts and metrics- `src/data_loader.py` — dataset loaders and helpers- `src/preprocessing.py` — normalization, tokenization, and text cleaning- `src/models/` — model classes or adapters- `src/utils/` — utility functions (logging, metrics, etc.)- `src/tests/` — unit and integration tests for core modules
File responsibilities and guidelines
- Keep functions small and well-documented.- Expose a stable API for inference (e.g., `predict(text: str) -> dict`). Document the input/output shapes.- Add type hints where practical.
Coding conventions
- Use the project style (PEP8). Add a linter config if needed (e.g., `pyproject.toml` or `.flake8`).- Write tests for data loaders and small utilities. Place tests under `src/tests/` and use pytest.
What to add when working in `src/`
- Small, focused commits that update a single feature or test.- If adding a new script, update top-level `README.md` with a one-line summary and usage example.- If you modify input/output shapes for the inference API, update the API docs and communicate in the PR description.
Quick example: inference contract
- Input: Arabic text string (utf-8)- Output: JSON object with fields such as `text`, `suggestions` (list), `confidence` (0-1), and optional `edits` with positions
Example output shape
```{ "text": "...", "suggestions": [ {"start": 5, "end": 12, "replacement": "...", "explanation": "grammar: agreement"} ], "confidence": 0.87}```
Testing
- Add unit tests for `preprocessing.py` and `data_loader.py` (happy path + one edge case).- Add a small integration test for `app.py` that exercises the prediction endpoint with a short sample input..gitattributesAdded+3
.gitignoreAdded+32
LICENSEAdded+21
README.mdAdded+32
requirements.txtAdded+8
src/README.mdAdded+55