A SwiftData-based ontology for Arabic dialects supporting localization and translation work.
Requirements: macOS 14 (Sonoma) or later, Xcode 15+, Swift 5.9+
- File → New → Project
- Select macOS → App
- Product Name:
ArabicOntology - Interface: SwiftUI
- Language: Swift
- Storage: None (we configure SwiftData manually)
Drag the three folders into Xcode's Project Navigator:
- Drag
Models/,Importer/,App/into the project - In the dialog: select Create groups
- Ensure Add to targets has
ArabicOntologychecked
All 11 Swift files should now appear in your project with target membership set to the app.
Collect CSV files in one folder:
data/
├── Qabas-dataset.csv # Required — lemmas and roots
├── Concepts.csv # Required — concept definitions
├── Relations.csv # Required — concept hierarchy
├── Baladi-dataset.csv # Optional — Lebanese forms
├── Baladi_RowText_sentences.csv # Optional — Lebanese sentences
├── Nabra-dataset.csv # Optional — Syrian forms
├── Nabra_RowText_sentences.csv # Optional — Syrian sentences
├── Curras-dataset.csv # Optional — Palestinian forms
├── Curras_RowText_sentences.csv # Optional — Palestinian sentences
├── Lisan-Iraqi-dataset.csv # Optional — Iraqi forms
├── Lisan-Iraqi_RowText_sentences.csv
├── Lisan-Libyan-dataset.csv # Optional — Libyan forms
├── Lisan-Libyan_RowText_sentences.csv
├── Lisan-Sudanese-dataset.csv # Optional — Sudanese forms
├── Lisan-Sudanese_RowText_sentences.csv
├── Lisan-Yemeni-dataset.csv # Optional — Yemeni forms
└── Lisan-Yemeni_RowText_sentences.csv
Note: The three required files give you the lexicon (58K lemmas, 16K roots, 14K concepts). Missing corpus files are skipped with warnings — but without them you won't have Forms, Sentences, or dialect correspondences. For comparing translations, include all corpus files.
- Build and run
- Click "Import Data"
- Select your data folder
- Wait for import (~10-15 min for full dataset)
- Search and explore
Database location: ~/Library/Application Support/ArabicOntology/ArabicOntology.store
To reset and re-import, quit the app and delete this file.
ArabicOntology/
├── Models/ # SwiftData entities
│ ├── Concept.swift
│ ├── Root.swift
│ ├── Dialect.swift
│ ├── Lemma.swift
│ ├── Form.swift
│ ├── Sentence.swift
│ └── ArabicNormalizer.swift
├── Importer/
│ ├── ImportService.swift # CSV → SwiftData
│ └── CSVParser.swift
└── App/
├── ArabicOntologyApp.swift
├── ContentView.swift
└── QueryService.swift
| Entity | Count | Description |
|---|---|---|
| Concept | ~14,000 | Meaning units with Arabic/English synsets |
| Root | ~16,000 | Consonantal skeletons (ك ت ب) |
| Lemma | ~58,000 | Dictionary headwords |
| Form | ~1,270,000 | Attested tokens in corpora |
| Sentence | ~56,000 | Usage contexts |
| Dialect | 8 | MSA + 7 regional varieties |
- MSA is a dialect — treated as one variety among equals
- Concept and Root are independent dimensions — query through either
- Correspondence is symmetric — no dialect is privileged
- Open-world polysemy — one lemma can express multiple concepts
- Register ≠ Dialect — Qabas
languagefield indicates register (MSA/colloquial/foreign), not dialect; all map to MSA for queries; actual dialect comes from corpus provenance
See the Design Proposal document for full citation requirements for:
- Qabas lexicon (Birzeit University)
- Arabic Ontology (Birzeit University)
- Dialect corpora (Birzeit SinaLab)