SuttaCentral

Levels of text organization: a list of types and its possible application

Note: this proposal is under consideration!

One of the more obscure concerns we have is how to organize the texts, respecting the complex hierarchies of the original texts while also being practical.

Often we find different terms for organizational elements at a similar level; for example, the saṁyutta of the Samyutta Nikaya is comparable to the nipāta of the Anguttara.

So far SuttaCentral has had no way of knowing all the levels that are used or their relations. It occurred to me yesterday that this information could be useful, and not too difficult to create. Here it is! This is the URL-friendly form.

[
  [
    "pitaka"
  ],
  [
    "sutta-group"
  ],
  [
    "nikaya", "agama", "bhikkhupatimokkha", "bhikkhunipatimokkha", "kammavaca-head", "book", "other-sutta", "bhikkhuvibhanga", "bhikkhunivibhanga", "khandhaka-head", "pakinnaka-head", "vinayanidana", "abhisamacarika", "vinayasamyutta", "vinayaekottara", "vinayamatika", "other-vinaya"
  ],
  [
    "vaggasamyutta"
  ],
  [
    "samyutta", "nipata", "vimana", "apattikkhandha", "part"
  ],
  [
    "pannasaka", "century"
  ],
  [
    "vagga"
  ],
  [
    "parami"
  ],
  [
    "sutta", "peyyala", "gatha", "apadana", "katha", "bhumi", "niddesa", "panha", "vamsa", "cariya", "puccha", "parivatta", "jataka", "dharani", "vibhanga", "vara", "uddesa", "samanna", "visesa", "sattha", "pannatti", "vatthu", "sikkhapada", "pakinnaka", "nidana", "khandhaka", "kammavaca", "ajjhaya", "gantha", "section"
  ]
]

Each set of items occurs at the same “level” of the hierarchy. And every item in SC’s texts has been assigned an item.

  • Some of the names are invented and will probably change.
  • English defines terms not found in the texts themselves.
  • Generally I try to use the same names as given in the texts, but sometimes I have assigned types.
  • Pali is used by convention.
  • Spelling variants are flattened, eg. pannasa = pannasaka.

Make navigation steps fully explicit

One of the major change in the new site is the nav cards, which replace the sidebar. One difference is that each step in navigation now has a URL and a title. However currently these are not always explicit. Using this list could help.

Let’s start by clicking on “Discourses”

The URL is /pitaka/sutta.

Under the new scheme we look at the top level navigation, which is pitaka. Elsewhere (in tipitaka.json) this is defined as the three pitakas, here it is suttapitaka. Thus this step is of “type” pitaka and instance suttapitaka. The URL would be /suttapitaka. And it would have a title “Suttapiṭaka” (with translation).

Okay, so let’s click on the top item which takes us here.

The URL is /pitaka/sutta/long

  • In type-tree.json this step is named sutta-group.
  • Thus the type-tree is pitaka/sutta-group.
  • in super-type.json, long is defined as a sutta-group.
  • URL would be /suttapitaka/long

It’s at the next step that things get more interesting. Click on the card and go here.

  • URL = pitaka/sutta/long/dn
  • Title = Dighanikaya
  • Content = list of vaggas

This does not make it clear what kind of content is being presented. The URL might apply to DN as a text, or a list of suttas or whatever. Similarly the Title does not describe the contents explicitly.

This is a case where the same essential “idea” (the “Digha Nikaya”) has multiple presentations. Go to the simple URL /dn and it gives the full list of sutta cards. But the title is the same, “Digha Nikaya”, and there is nothing in the URL or title to distinguish between the two cases.

In the new approach, under type -tree this would be a nikaya, and the content would be either vaggas or suttas.

The first case would be as follows:

  • URL = /suttapitaka/long/dn-vaggas
  • title = “Digha Nikaya vaggas”
  • Content = list of vaggas

The second case would be as follows:

  • URL = /suttapitaka/long/dn-suttas
  • title = “Digha Nikaya suttas”
  • Content = list of suttas

The URL can be aliassed to /dn for convenience and backwards compatibility, but the content would be the same.

5 Likes

This looks great Bhante, but one thing that I foresee is that finding a discourse with just the discourse number is not going to be easy as it is now.
For example, if I want SN 3.20 I can find it easily now. With the new arrangement, if I understand it right, I have to know the hierarchy in order to get to SN 3.20.
Just my thoughts for your consideration.
With Metta

2 Likes

What I do in such a case is go to the URL line in my browser and type:

https://suttacentral.net/sn3.20

or, if I know which version I want:

https://suttacentral.net/sn3.20/en/sujato

And having my settings to showing Pali along with translation I automatically get the bilingual version.

But I understand that this is not everybody’s cup of tea. :tea:

5 Likes

This is awesome. Thanks for sharing the information. BTW where can someone find this shortcut?
With Metta

1 Like

You simply insert the ID of the sutta you want to find after suttacentral.net/. If you know the language and translator you want you add these details after that. The URL always follows the same pattern:

suttacentral.net/sutta-id/language-code/translator

1 Like

Don’t worry Nimal, this has nothing to do with the navigation as such, and may not even be anything at all. It’s just some thoughts about possible ways our programmers can understand the relations between things on the site.

2 Likes

I have another hack… I click on the search icon and type SN3.20 … it almost always shows up the relevant sutta in the first few results. (There should be no space between the SN, MN etc part and the number.)
:slightly_smiling_face:

3 Likes

Go to the Voice searchbox and type SN3.20—it invariably always gives you the desired Sutta as the only result. And it doesn’t matter whether you type SN 3.20 or SN3.20 or sn3.20 or sn 3.20—it always works.

If your settings for translation language are English you will see Bhante Sujato’s translation. If you then click on the three vertical dots behind the time estimate this takes you to the SuttaCentral Suttaplex card of that Sutta.

Screenshot from 2020-11-17 15-33-14

I know I am biased, and I admit it … :woman_shrugging:

Oh well, and the interface language is not English … I only noticed after uploading my screen shot. Never mind!

2 Likes

Very true!
SuttaCentral’s native search function is frustrating! I don’t know if they have figured out the why of it…
Which search engine provider do you use for Voice? Is it based on elastic search like SuttaCentral or is it something else?
I’m loving the cards look though … very appealing aesthetically! :slightly_smiling_face:

2 Likes

Voice uses good old ripgrep.

2 Likes

Actually, what Voice does is restricting the search results very heavily.

As Voice is developed as an application to suit the needs of assisted users who use a screen reader, a main concern is not to flood the user with search results. Therefore Voice only searches segmented texts—which limits the results for English at the moment to Bhante Sujato’s translations.

Type root of suffering in SuttaCentral, and you get 7642 results. Type it in Voice, and you get 7.

You can find other (non-segmented) texts too if you want. In this case you have to type something like sn3.20/en/bodhi, and you’ll go directly to Bhikkhu Bodhi. However this does not give you the same features as segmented texts can give you, like for example bilingual view together with Pali. (Except for, there is no Bhikkhu Bodhi for SN 3.20. :see_no_evil: For such cases you have to know which translations are available.)

1 Like

“hack” AKA “using it as intended”. :laughing: This should give you the sutta card as the top result.

And there’s the rub. Getting literal results from a few entities is easy, getting the right results from many entities is hard.

2 Likes

That is true. Voice is going the easy way. And there is certainly a need of something more comprehensive than Voice.

And, just to say, without SuttaCentral there would be no Voice! So my bias is indeed towards two sides … (is that possible?) :grin:

I simply need to do a bit of advertising for Voice every now and again—being involved in that project, I can’t help that my enthusiasm is sometimes overflowing a little. :woman_shrugging:

5 Likes