isnady 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Bayram Kotan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bayram Kotan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -8,12 +8,12 @@
8
8
 
9
9
  <p align="center">
10
10
  <a href="https://pypi.org/project/isnady/">
11
- <img src="https://img.shields.io/badge/PyPI-v0.1.7-1D4777?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI">
11
+ <img src="https://img.shields.io/badge/PyPI-v0.1.8-1D4777?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI">
12
12
  </a>
13
13
  <img src="https://img.shields.io/pypi/pyversions/isnady?style=for-the-badge&color=A47E24&logo=python&logoColor=white" alt="Python">
14
14
  <img src="https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-5B6878?style=for-the-badge" alt="Platform">
15
15
  <a href="https://www.npmjs.com/package/isnady">
16
- <img src="https://img.shields.io/badge/npm-v0.1.7-14304F?style=for-the-badge&logo=npm" alt="npm">
16
+ <img src="https://img.shields.io/badge/npm-v0.1.8-14304F?style=for-the-badge&logo=npm" alt="npm">
17
17
  </a>
18
18
  <img src="https://img.shields.io/badge/License-MIT-D6B25E?style=for-the-badge" alt="License">
19
19
  </p>
@@ -43,7 +43,7 @@
43
43
  <img src="https://raw.githubusercontent.com/bayramkotan/isnady/main/assets/screenshots/search-arabic.png" alt="Searching النيات finds بالنيات in Sahih al-Bukhari 1, with the chain above the text" width="850">
44
44
  </p>
45
45
 
46
- > **Pre-alpha (0.1.7).** Search and chains of transmission work today, on data you import
46
+ > **Pre-alpha (0.1.8).** Search and chains of transmission work today, on data you import
47
47
  > in one command. Narrators, scholars, gradings and the rest are being built, in the open.
48
48
 
49
49
  ---
@@ -170,21 +170,26 @@ it opens it.
170
170
 
171
171
  ## 🚀 Quick Start
172
172
 
173
- isnady ships without hadith data: you choose the sources. One command brings in Sahih
174
- al-Bukhari and Sunan Abi Dawud in Arabic and Turkish from the open
175
- [fawazahmed0/hadith-api](https://github.com/fawazahmed0/hadith-api) collection (public
176
- domain):
173
+ isnady ships without hadith data; it reads it from a **data repository**. The default is
174
+ isnady's own, [**bayramkotan/isnady-data**](https://github.com/bayramkotan/isnady-data), which
175
+ holds every Sunni and Shia collection and rijal work isnady can read — 35 sources, from Sahih
176
+ al-Bukhari to al-Kafi (see [Data sources](#-data-sources) below). Open the window with `iy`,
177
+ choose **File → Data Sources**, and import any of them with one click — or **Import all** — in
178
+ the languages you tick. The same from the command line:
177
179
 
178
180
  ```bash
179
- iy import fawazahmed0 https://cdn.jsdelivr.net/gh/fawazahmed0/hadith-api@1/editions.json \
180
- --book bukhari --book abudawud --language ara --language tur --license Unlicense
181
+ iy catalog list # the sources of the repository in use
182
+ iy catalog import sahih_al_bukhari --language ara --language tur
183
+ iy catalog import musnad_ahmad_ibn_hanbal
184
+ iy catalog import al_kafi_al_kulayni # with al-Majlisi's and al-Behbudi's grades
185
+ iy catalog import taqrib_al_tahdhib_ibn_hajar_al_asqalani # identifies the narrators in the chains
186
+ iy catalog import --all # everything
181
187
  ```
182
188
 
183
- Or open the window with `iy` and choose **File → Data Sources**: every built-in collection
184
- (al-Bukhari, Muslim, Abu Dawud, al-Tirmidhi, al-Nasa'i, Ibn Maja, the Muwatta and three
185
- forty-hadith books) and the Taqrib import with one click — or **Import all** — in the
186
- languages you tick. You can add your own files or links there too, and move the data
187
- folder anywhere you like.
189
+ Other repositories can be chosen instead — the datasets others publish on GitHub and Hugging
190
+ Face are in the list — and any repository with an isnady catalog can be added
191
+ (`iy repo add https://github.com/owner/name`). Your own files and links can be added too, and
192
+ the data folder can be moved anywhere you like.
188
193
 
189
194
  On the command line:
190
195
 
@@ -196,13 +201,8 @@ iy chain bukhari 1 # one chain, narrator by narrator
196
201
 
197
202
  Importing takes a minute or two; the search index and the chains are built as part of it.
198
203
 
199
- To identify the narrators in those chains, add Ibn Hajar's *Taqrib al-Tahdhib* — 8,824
200
- narrators with his verdict on each — from the [OpenITI](https://github.com/OpenITI) corpus:
201
-
202
- ```bash
203
- iy import taqrib https://raw.githubusercontent.com/OpenITI/0875AH/master/data/0852IbnHajarCasqalani/0852IbnHajarCasqalani.TaqribTahdhib/0852IbnHajarCasqalani.TaqribTahdhib.JK000121-ara1.completed
204
- iy narrator الزهري
205
- ```
204
+ With Ibn Hajar's *Taqrib al-Tahdhib* imported (8,824 narrators, his verdict on each), every
205
+ chain is read narrator by narrator: `iy narrator الزهري`.
206
206
 
207
207
  ---
208
208
 
@@ -214,7 +214,9 @@ iy narrator الزهري
214
214
  | **Attached prefixes** | `النيات` finds `بالنيات`, because Arabic joins bi-, wa-, fa- and al- to the word. *Whole words only* turns this off |
215
215
  | **Latin-script text** | Case and accents are ignored: `NIYET`, `niyet` and `nîyet` are one word; `Muʿādh`, `Mu'adh` and `Muadh` too |
216
216
  | **Match** | All words, any word, or the exact phrase |
217
- | **Filters** | Book and language; the language filter also chooses which translations appear |
217
+ | **Books** | All books, all Sunni, all Shia, or any few ticked one by one — Sunni collections listed first, Shia after them |
218
+ | **Language** | One language to search in; the languages you do not read are folded behind an arrow on each hadith (**Settings → Books and languages**), a click opens them |
219
+ | **Active books** | A book can be switched off in **Settings → Books and languages**: it stays imported but is left out of searches, book lists and statistics until switched on |
218
220
  | **Grades** | Shown under each hadith with the scholar's name, exactly as given |
219
221
  | **Highlighting** | On the original, diacritised text, diacritics included |
220
222
 
@@ -311,7 +313,12 @@ al-Din 'Abd al-Hamid on Sunan Abi Dawud) and shows:
311
313
 
312
314
  Two graders who agree far too often to be independent (98.1%) count as one voice in the model,
313
315
  and the page says so. Results are computed once and kept in a file. `iy stats graders`.
314
- Narrators, books, hadith, chains, correlations and the models follow, tab by tab.
316
+ Narrators, books, hadith, chains, correlations and the models follow, tab by tab. **Correlations
317
+ and tests** sets every measure against every other — Spearman's ρ with Benjamini–Hochberg q-values,
318
+ and the partial ρ with all the others held equal (what each factor of the chain says of each
319
+ scholar's grade on its own) — and tests what differs: the scholars' grades pair by pair
320
+ (Stuart–Maxwell), the books (Kruskal–Wallis, Mann–Whitney with Cliff's δ), and whether the hadith
321
+ model's shape holds (Brant's test). `iy stats lab`.
315
322
 
316
323
  <p align="center">
317
324
  <img src="https://raw.githubusercontent.com/bayramkotan/isnady/main/assets/screenshots/statistics.png" alt="Statistics — the graders of Sunan Abi Dawud: Krippendorff's alpha, agreement with intervals, the model's certainty" width="850">
@@ -477,24 +484,46 @@ command line.
477
484
 
478
485
  ---
479
486
 
480
- ## 📚 Data and licences
481
-
482
- isnady reads open formats and keeps the source of everything:
483
-
484
- - **Supported now:** the [fawazahmed0/hadith-api](https://github.com/fawazahmed0/hadith-api)
485
- JSON format, from a file or a URL, with or without authentication (username and
486
- password, bearer token, or API key; credentials are never stored).
487
- - **Rijal:** Ibn Hajar's *Taqrib al-Tahdhib* in OpenITI mARkdown — each narrator's name,
488
- kunya, verdict, rank, tabaqa, death year and book marks, read by the rules Ibn Hajar sets
489
- out in his own introduction. The OpenITI release does not state its licence in the
490
- repository, so it is kept as tier C (used on your computer, never redistributed) until
491
- it is confirmed.
492
- - **Coming:** CSV, SQL/SQLite, OpenITI mARkdown, REST APIs and Shamela, so any collection
493
- you have can be brought in.
494
-
495
- Every source records a licence **tier**: **A** may be redistributed, **B** may be
496
- redistributed under its conditions, **C** may not. Sources you add yourself stay on your
497
- computer. **Help → Licences** lists every source in your database with its licence.
487
+ ## 📚 Data sources
488
+
489
+ isnady reads its sources from a **repository**: a `catalog.json` listing books and rijal works,
490
+ where each file is, its format, its licence and its tradition. Choose one in **Settings → Data
491
+ sources** (or `iy repo use ID`); add your own with **Add a repository…** (`iy repo add URL`: a
492
+ GitHub repository, a Hugging Face dataset, a catalog URL or a folder).
493
+
494
+ **The default — [isnady-data](https://github.com/bayramkotan/isnady-data)** holds every source
495
+ below in one place and in isnady's own format, each book in a folder named by its full title and
496
+ its compiler — `sunni/sahih_al_bukhari/`, `sunni/musnad_ahmad_ibn_hanbal/`, `shia/al_kafi_al_kulayni/`
497
+ (a `book.json` and one file per language) — and the works on the narrators in `rijal/sunni/`,
498
+ `rijal/shia/`.
499
+
500
+ | | Sunni | Shia |
501
+ |---|---|---|
502
+ | **Hadith** | Sahih al-Bukhari, Sahih Muslim, Sunan Abi Dawud, Jami' al-Tirmidhi, Sunan al-Nasa'i, Sunan Ibn Maja, the Muwatta, the Forty of al-Nawawi, Forty Hadith Qudsi, the Forty of Shah Waliullah — Arabic and up to eight translations, with grades · Musnad Ahmad, Sunan al-Darimi · Riyad al-Salihin, al-Shama'il al-Muhammadiyya, Bulugh al-Maram, al-Adab al-Mufrad, Mishkat al-Masabih | al-Kulayni's al-Kafi (8 volumes, with al-Majlisi's and al-Behbudi's grades) · al-Saduq's 'Uyun Akhbar al-Rida, al-Amali, al-Khisal, al-Tawhid, Ma'ani al-Akhbar, Thawab al-A'mal, Sifat al-Shi'a, Fada'il al-Shi'a · al-Mufid's al-Amali · Ibn Qulawayh's Kamil al-Ziyarat · al-Nu'mani's and al-Tusi's Kitab al-Ghayba · al-Ahwazi's al-Mu'min and al-Zuhd · al-Muhsini's Mu'jam al-Ahadith al-Mu'tabara — Arabic and English |
503
+ | **Narrators** | Ibn Hajar, *Taqrib al-Tahdhib* | al-Najashi, *Rijal* |
504
+
505
+ The credits for where each text was first published are in the repository's README.
506
+
507
+ **Optional repositories**, each the dataset as its authors publish it (their books under their
508
+ own keys, e.g. `bukhari-lk`, so editions with other numbering never mix):
509
+
510
+ | Repository | What it holds | Licence |
511
+ |---|---|---|
512
+ | [fawazahmed0/hadith-api](https://github.com/fawazahmed0/hadith-api) | 10 collections, Arabic + 8 languages, grades | Unlicense |
513
+ | [Thaqalayn](https://github.com/MohammedArab1/ThaqalaynAPI) | 16 Shia collections, Arabic + English, grades of al-Kafi | not stated (from thaqalayn.net) |
514
+ | [Open Hadith Data](https://github.com/mhashim6/Open-Hadith-Data) | the nine books in Arabic with diacritics, seven with a commentary of every hadith | ODbL |
515
+ | [hadith-json](https://github.com/AhmedBaset/hadith-json) | 17 books, Arabic + English (50,884 hadith, from sunnah.com) | not stated |
516
+ | [LK Hadith Corpus](https://github.com/ShathaTm/LK-Hadith-Corpus) | the six books, Arabic + English, isnad and matn marked apart, grades | not stated (cite the authors' paper) |
517
+ | [Hugging Face — meeAtif/hadith_datasets](https://huggingface.co/datasets/meeAtif/hadith_datasets) | the six books, Arabic + English, chapter titles, grades | MIT (as declared; text from sunnah.com) |
518
+ | [Hadith-Data-Sets](https://github.com/abdelrahmaan/Hadith-Data-Sets) | the nine books in Arabic (62,169 hadith) | not stated |
519
+ | [OpenITI](https://github.com/OpenITI) | the Taqrib and al-Najashi's Rijal | not stated in the repository |
520
+
521
+ Every source records a licence **tier**: **A** may be redistributed, **B** may be redistributed
522
+ under its conditions, **C** may not. Sources you add yourself stay on your computer. **Help →
523
+ Licences** lists every source in your database with its licence. Any CSV or JSON table of hadith
524
+ can be read through a catalog that names its columns (format `table`); the fawazahmed0 JSON
525
+ format, OpenITI mARkdown (the Taqrib, al-Najashi) and files of your own with or without
526
+ authentication (credentials are never stored) are read as well.
498
527
 
499
528
  ---
500
529
 
@@ -514,15 +543,18 @@ script. The command line never loads Qt.
514
543
  | `iy shortcut` | `isnady shortcut --no-desktop` | A desktop and applications-menu shortcut, with isnady's icon |
515
544
  | `iy term [NAME]` | `isnady term --search tadlis` | The glossary: a term's meaning, English or Turkish (`--lang tr`) |
516
545
  | `iy stats graders` | `isnady stats graders --book abudawud` | The graders of a book in depth: agreement, model, strictness |
546
+ | `iy stats model` | `isnady stats model --grader albani` | What each scholar's grade follows: ordinal regression, odds ratios, surprises |
547
+ | `iy stats lab` | `isnady stats lab --csv ./lab` | Correlations (Spearman, partial, BH q) and tests (Stuart–Maxwell, Kruskal–Wallis, Mann–Whitney, Brant) |
517
548
  | `iy book [KEY [CHAPTER]]` | `isnady book bukhari 2` | The books; a book's chapters; a chapter read in order |
518
549
  | `iy scholar [NAME]` | `isnady scholar albani` | The scholars in the data, or one of them with his measured statistics |
519
550
  | `iy tahric BOOK NUMBER` | `isnady tahric bukhari 1` | Other narrations of a hadith in the imported books (takhrij) |
520
551
  | `iy search --mode meaning WORDS` | `isnady search --mode meaning "komşu hakları"` | Search by meaning and across languages |
521
552
  | `iy narrator NAME` | `isnady narrator "Ibn Umar"` | A narrator: Ibn Hajar's verdict and rank, tabaqa, death year, books, other names; with `--limit 1` also teachers, students and hadith |
522
553
  | `iy import FORMAT FILE-OR-URL` | `isnady import …` | Import a source; `--book`, `--language`, `--license`, `--user`, `--token-env`, `--api-key-env` |
523
- | `iy catalog list` | `isnady catalog list` | Built-in sources and your own, with what is imported — the same as File → Data Sources |
524
- | `iy catalog import ID` | `isnady catalog import fawaz-muslim --language tur` | Import a listed source; `remove`, `add`, `delete` manage the list |
525
- | `iy catalog import --all` | `isnady catalog import --all --language ara` | Every built-in source at once |
554
+ | `iy repo [list\|use\|show\|add\|remove]` | `isnady repo use thaqalayn` | The data repositories: isnady's own (default), the optional ones, yours |
555
+ | `iy catalog list` | `isnady catalog list --repo lk-hadith-corpus` | The sources of the repository in use, and your own, with what is imported — the same as File → Data Sources |
556
+ | `iy catalog import ID` | `isnady catalog import sahih_muslim --language tur` | Import a listed source; `remove`, `add`, `delete` manage the list |
557
+ | `iy catalog import --all` | `isnady catalog import --all --language ara` | Every source of the repository at once |
526
558
  | `iy datadir [FOLDER]` | `isnady datadir /data/isnady` | Show or change where the database and settings live; `--as-is`, `--default` |
527
559
  | `iy formats` | `isnady formats` | Formats that can be imported |
528
560
  | `iy sources` | `isnady sources` | Imported sources, their licence and tier |
package/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare const version: string;
2
- export declare const name: string;
3
-
4
- export interface IsnadyInfo {
5
- name: string;
6
- version: string;
7
- dataLoaded: boolean;
8
- homepage: string;
9
- }
10
-
11
- export declare function info(): IsnadyInfo;
1
+ export declare const version: string;
2
+ export declare const name: string;
3
+
4
+ export interface IsnadyInfo {
5
+ name: string;
6
+ version: string;
7
+ dataLoaded: boolean;
8
+ homepage: string;
9
+ }
10
+
11
+ export declare function info(): IsnadyInfo;
package/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * database (used by both the Python and JavaScript packages) exists.
7
7
  */
8
8
 
9
- export const version = "0.1.7";
9
+ export const version = "0.1.8";
10
10
  export const name = "isnady";
11
11
 
12
12
  /** Returns basic package information. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isnady",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Hadith search with full isnad chains, narrator biographies, jarh wa ta'dil verdicts and reliability scores",
5
5
  "type": "module",
6
6
  "main": "./index.js",