izkur
Code implementation of Israel's legal citation style guide – כללי האזכור האחיד בכתיבה המשפטית
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Repository
Code implementation of Israel's legal citation style guide – כללי האזכור האחיד בכתיבה המשפטית
Basic Info
- Host: GitHub
- Owner: Dardasaba
- License: mit
- Language: Python
- Default Branch: main
- Size: 28.3 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
❝❞ Izkur – Israeli Legal Citation Parser
Izkur (אִזְכּוּר, "citation" in Hebrew) is a Python library for parsing, analyzing, and generating structured representations of Israeli legal citations. It follows the 3rd edition of the official guide "כללי האזכור האחיד בכתיבה המשפטית" and is built with compiler-inspired components for clarity, maintainability, and correctness.
🚀 Project Goals
- 🏛 Parse Israeli legal citations into structured, queryable data.
- ⚖️ Support multiple citation types: cases, statutes, books, articles, etc.
- 🧠 Enable CLI, JSON, and Python API usage.
- 🧩 Use compiler techniques: lexical analysis, parsing, semantic analysis.
- 🧰 Provide extensible Symbol Table and Error Handling infrastructure.
🧱 Architecture Overview
| Phase | Component | Description |
|---------------------|--------------------------|-----------------------------------------------|
| Lexical Analysis | tokenizer/ | Splits text into tokens. |
| Syntax Analysis | parser/ | Builds AST from token stream. |
| Semantic Analysis | symbols/, errors/ | Validates structure, resolves entities. |
| Code Generation | __str__, to_json | Converts back to citation or structured data. |
📁 Directory Layout
shell
izkur/
├── tokenizer/ # Lexical analysis: token definitions & scanner
├── parser/ # Syntax analysis: grammar and AST generation
├── symbols/ # Symbol tables for cases, laws, etc.
├── errors/ # Centralized error reporting & recovery
├── models/ # Core domain models (e.g., Case, Legislation)
├── cli/ # Command-line interface (using Typer)
├── api/ # API
├── config/ # Configuration
├── tests/ # Unit and integration tests
└── init.py
📦 Installation
via pip:
bash
pip install izkur
Or if you prefer using uv:
bash
uv add izkur
(Or clone the repo and use uv or hatch if you're developing.)
🔧 Usage Examples
From Python
```python from izkur import parse_citation
citation = 'בג"ץ 1234/22 פלוני נ׳ מדינת ישראל' result = parsecitation(citation) print(result.todict()) ```
From CLI
bash
izkur parse 'ע"פ 5678/21 מדינת ישראל נ׳ אלמוני'
🧪 Running Tests
bash
pytest
Or, if using hatch:
bash
hatch run test
🧠 Components in Detail
🗂️ Symbol Table
Keeps track of known courts, laws, abbreviations, collections.
Used during semantic analysis for validation and normalization.
⚠️ Error Handler
Centralizes error reporting by stage: lexical, syntactic, semantic.
Errors are recoverable and can be displayed with position info.
🧭 Roadmap
[x] Tokenizer and basic AST scaffolding
[x] Error handler
[ ] PEG-based parser
[ ] Support all citation types
[ ] Export to Bluebook / OpenCitations JSON formats
[ ] Web interface for testing and visualization
🤝 Contributing
Want to help? Awesome.
- Fork and clone
- Create a branch
- Write tests and code
- Submit PR
📃 License
MIT License © 2025 Dardasaba
📚 References
- Specification: כללי האזכור האחיד בכתיבה המשפטית, מהדורה שלישית
- Python PEG Parser
- Compiler Design Books
Owner
- Name: Ya'ir Eli
- Login: Dardasaba
- Kind: user
- Repositories: 0
- Profile: https://github.com/Dardasaba
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - name: "Dardasaba" title: "Izkur" version: 0.1.0 url: "https://github.com/Dardasaba/izkur"
GitHub Events
Total
- Push event: 3
- Create event: 1
Last Year
- Push event: 3
- Create event: 1
Dependencies
- babel 2.17.0
- click 8.2.1
- colorama 0.4.6
- izkur 0.1.0
- loguru 0.7.3
- markdown-it-py 3.0.0
- mdurl 0.1.2
- pygments 2.19.1
- rich 14.0.0
- shellingham 1.5.4
- typer 0.16.0
- typing-extensions 4.14.0
- win32-setctime 1.2.0