CLI Reference¶
QuranKit provides a command-line interface for dataset management, search, and textual analysis.
Installation¶
Global Options¶
qurankit [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--help Show this message and exit.
Data Commands¶
qurankit data list¶
List available datasets.
qurankit data install¶
Install a dataset.
qurankit data install tanzil # Install Tanzil text
qurankit data install qac # QAC morphology (manual download required)
qurankit data install tanzil --force # Force reinstall
qurankit data validate¶
Validate an installed dataset's checksums.
qurankit data manifest¶
Show or export dataset manifest.
Text Access Commands¶
qurankit ayah¶
Get ayah text and word tokens.
qurankit surah¶
List surahs or get surah details.
qurankit editions¶
List available text editions.
Search Commands¶
qurankit search¶
Search for text in the Qur'an.
Modes:
- exact — Exact source text match
- diacritic-insensitive — Ignore vocalization marks (default)
- broad — Broad orthographic matching
- canonical — Unicode NFC normalization only
Mutashabihat Commands¶
qurankit mutashabihat¶
Find repeated phrases for an ayah.
qurankit ngrams¶
Find recurring n-grams across the corpus.
qurankit report¶
Generate detailed mutashabihat comparison report.
qurankit report "2:255" -m exact
qurankit report "2:255" -m near-duplicate --threshold 0.8
qurankit report "2:255" -m normalized --profile "search-broad-v1"
qurankit corpus-stats¶
Corpus-level mutashabihat statistics.
Research Commands¶
qurankit research semantic-relations¶
Find semantic relations from dictionary sources.
qurankit research semantic-relations "ر ح م" --type synonym
qurankit research semantic-relations --lemma "رحمة" --type antonym
qurankit research semantic-relations "ك ت ب" --type all
Types: synonym, antonym, related, all
qurankit research collocations¶
Compute corpus-wide collocations.
qurankit research collocations --top 50 --measure pmi
qurankit research collocations -w 10 --min-cooc 5 --measure dice
qurankit research collocations --no-stopwords
Measures: pmi, t_test, dice, log_likelihood, frequency
qurankit research collocations-for¶
Get collocations for a specific word.
qurankit research collocations-for "الْحَمْدُ" --top 20
qurankit research collocations-for "رحمن" -w 5 --measure log_likelihood
qurankit research cross-refs¶
Find cross-references for an ayah.
qurankit research cross-refs "2:255" --implicit
qurankit research cross-refs "2:255" --explicit
qurankit research cross-refs "2:255" --implicit --min-roots 3 --limit 30
qurankit research wujuh-wa-nazair¶
Find wujuh wa nazair candidates.
qurankit research wujuh-wa-nazair "2:255" --limit 20
qurankit research wujuh-wa-nazair --limit 100 # Corpus-wide
qurankit research wujuh-wa-nazair "2:255" --min-shared 2 --threshold 0.5
Normalization¶
qurankit profiles¶
List available normalization profiles.
Examples¶
Quick Start¶
# Install data
qurankit data install tanzil
# Search
qurankit search "بسم الله الرحمن الرحيم"
# Get ayah
qurankit ayah "2:255"
# Find repeated phrases
qurankit mutashabihat "2:255"
# Research
qurankit research collocations --top 20
qurankit research cross-refs "2:255" --implicit
Research Workflow¶
# 1. Find collocations for a key term
qurankit research collocations-for "رحمن" --measure pmi --top 15
# 2. Find related verses by shared vocabulary
qurankit research cross-refs "2:255" --implicit --limit 10
# 3. Check for wujuh wa nazair
qurankit research wujuh-wa-nazair "2:255" --limit 15
# 4. Get detailed mutashabihat report
qurankit report "2:255" -m normalized --min-length 3
Dictionary Research¶
# Find synonyms from Lane's Lexicon / Al-Mufradat
qurankit research semantic-relations "ر ح م" --type synonym
qurankit research semantic-relations --lemma "رحمة" --type all
Exit Codes¶
0— Success1— General error2— Invalid command/arguments