Commentaries
Learn about working with commentaries in Sefaria's database.
How to Work With Commentaries
In the Sefaria database, commentaries are considered texts like any other. In practical terms, this means works of commentary have an individual Index, and each edition of text for that commentary is represented by its own Version record.
Index Attributes for Commentaries
Sefaria uses specific attributes on the Index record to indicate that an Index is a commentary relating to another source in the Library. These attributes are elaborated in the following table:
Attribute | Type | Description |
|---|---|---|
|
| Generally |
|
| The base text that a commentary depends upon. For example, |
|
| Enables auto-linking between a base text and a commentary. These values match keys in the So far, there are four options for auto-linking:
The corresponding These keys help maintain the auto-linking feature once afforded commentaries by default. They also make room to expand, and to implement various algorithms for linking between a dependent text and its base text/s. |
|
| This is the value for a group of index records. It is used to contain a former commentator name, which was once the primary handle on a commentary and is now used to group many indices belonging to a larger corpus, such as commentaries. This key requires a matching Hebrew For example: The |
|
| Only texts with The default for this key is |
For example: Here is how these specific fields would be filled on the Index record of Ramban on Genesis:
"title": "Ramban on Genesis"
"base_text_titles": [
"Genesis"
],
"base_text_mapping": "many_to_one",
"collective_title": "Ramban",
"dependence": "Commentary",
"categories": ["Tanakh", "Rishonim on Tanakh", "Ramban", "Torah"]
Commentaries and Categories
Categories are mostly used to indicate where a book will show up in the Sefaria Table of Contents.
For example: The text "Ramban on Genesis", with the category path of ["Tanakh", "Rishonim on Tanakh", "Ramban", "Torah"], will show up under Tanakh >> Rishonim on Tanakh >> Ramban >> Torah.
Please note:
-
For a commentary, the category indicating the type of commentary (e.g.,
Rishonim on Tanakh) comes after one top level category (e.g.,["Tanakh", "Rishonim on Tanakh", "Ramban", "Torah"]) -
In some cases, a commentary will be indicated after multiple categories. This is particularly common for commentaries on Talmud (e.g.,
["Talmud", "Bavli", "Rishonim on Talmud", "Rashi", "Seder Zeraim" ])