The urls on suttacentral.net are actually very regular and if you could remember how, itās possible to just type what you want in the url bar. However, there are lots of mistakes you can make and end up with nothing. This tool aims to take your attempt at a citation and turn it into a working link on not only SuttaCentral, but also SuttaFriends.org, DhammaTalks.org, and ancient-buddhist-texts.net. This is especially helpful because the last three donāt have complete coverage. I have created a table of the existing translations, so the lookup is happening from that. As new translations are added to those sites they will have to be added to the tool.
One particularly handy feature is being able to get an exact link to a Dhammapada verse. Just type dhp123 and it will automatically give you a link directly to that verse. However, Iām not sure how stable that will be on the SuttaCentral links. (Bhante @Sujato, is the verse id #dhp123:1 a real thing, or just a temporary fix? There doesnāt seem to be a way to see that id on the front end.)
And you donāt need to use the mouse to select one of the results. Simply pressing return in the input field will open SCās link in a new tab. Otherwise you can tab to the button you want to open.
This tool aims to take the name of a sutta either in Pali or in English (from the names in the Wisdom Publications editions) and give you citations/links to all possible suttas.
There are two modes: exact search and what I call fuzzy search. Exact requires your complete or partial search term to match exactly including diacritics. The fuzzy search ignores not only diacritics but also aspirated consonants (e.g. kh, gh, th, dh are treated as k, g, t, d) and even double consonants. Exact is much faster, but as it says, requires a precise search term.
The database for the Pali in this tool came from a 10 year old spreadsheet given to me by John K. I believe it was used in the construction of SuttaCentral. It includes alternate names for many suttas, but I canāt guarantee it has every possible alternative.
Big thanks goes to @Khemarato.bhikkhu for his help and especially encouragement. But as always, the responsibility for all errors is mine. And there may be many!!! This is my first real coding project. Iām too embarrassed to show the code yet, but hope to do so eventually.
There are enough ambiguous queries even in citation land (e.g. Dhp 4 might refer to āHe abused meā¦ā or to the Flowers chapter) that I think it worthwhile to add the concept of multiple results to the Citation helper. Perhaps like this:
So in that situation I wonder if the person entering āDhp 4ā is actually uncertain as to what they are after. My guess is that while that citation may be ambiguous, for the person typing it in, they know what they have in mind.
To that end, Iāve added a new warning message letting the user know that for the book they are working with, if they want the chapter, they can use the chapter flag:
(Itās not working yet with SN and AN yet, though. Chapters work, just no alert message)
Iām kind of averse to giving multiple options because I think outside of the Dhammapada, the citations are not actually that ambiguous. That is, as long as you know that itās not a PTS citation.
Iām working on the principle that as long as you give the user hints, itās better to give them the option to type exactly what they want, kind of like a command line. For the most part though, typing in any correct citation will give you the correct link.
Can you or anyone else give an example of another ambiguous citations that are used (not just theoretically possible).
Which you had helpfully explained, but which still confuses me But I guess it isnāt too bad: If I search for āAN 10.196ā I can just click on both the SC and DT links and hope one or the other is the one Iām looking for. Doesnāt work if I was given the ATI number (āan 10.208ā) thoughā¦
Right. Iām totally interested in hearing how people would want that problem to be solved. If the user knew which translator the citation came from, then they could just choose that translatorās translation from the list and then they would be fine. The trick is then finding the same sutta by a different translator.
I guess as long as the user knew which translator it came from, then it would be possible for them to ask for the citation from the other translator. So then there could be two input boxes. One to convert an Ajahn T translation to Bhante Bodhiās and one to do the opposite.
the links suddenly appear when I start typing in. I would prefer it to be explicit that thereās nothing available from the start and then fill in the links when available. This would also stop elements jumping down on mobile, which was a bit distracting:
The example text in the input box wasnāt grey enough for me to realise that it was an example at first. Maybe put it in italics? Or maybe more explicit? āfor example type: MN141ā? Something like that. But I often have problems with that sort of thing.
Thanks so much for taking a look and giving specific feedback!
Yes, I played around with that. Iām assuming you mean it should be lighter? It is already much lighter than the default. I thought that any lighter than it is and it would become an accessibility issue. How does this look:
Do you mean that it wasnāt clear why they were grayed out? The idea is that the only time you get to choose a layout is if you are picking Bhante Sujatoās translation. What would you suggest to improve it? I figured that graying out options that were unavailable was fairly straightforward, but I guess itās not.
Hmm. I can see that now. I had hoped that these labels would make it clear what was going on:
Do you think having a label above the bottom section would help? Something like āDirect Website Linksā?
I have considered wrapping the whole thing in tabbed sections where one tab would be for citation look up, another would be for searching for a Pali sutta name (i.e. the other app) and a third would be for the links section. But I really wanted the links area available for me to just click on when I wanted it. But you are right, they really are two totally different things. The links section is a way to avoid having to click so many times on the SC interface.
Right. I went back and forth on that. My thinking was the clearest way to indicate that nothing was available was ā¦ to show nothing. For SuttaFriends.org and Ancient Buddhist text, there is going to be a lot of times when nothing is available. So having those constantly there saying nothing was available didnāt make sense to me.
But the jumping. I know. Iām not so crazy about that. So, for now I have stopped the jumping by fixing the height of the link button area.
Thanks again for taking the time to give such specific feedback. If you could clarify the things I have asked about that would be wonderful.
Actually when you made your browser plugin to make Discourse be without hearts, it got me thinking of other ways plugins might enhance the suttasphere. I have the idea to try and turn these apps into a browser plugin either as a simple page as is, or what Iād really like is to have it integrated into the browser bar. So instead of trying for a citation in the input box on the page, you would just type into the url bar and then the possible links would appear at the top of the drop down of suggestions. Seems like it should be possible.
It is in fact missing most of the translators. There are actually lots and lots of translators of English texts. But Bhante Sujato is the only one who has all of the major and most of the minor books. (He doesnāt have Vv, Pv, or Ja). Bhante Bodhi has a whole lot (and heās popular) so thatās why I included him.
The app works from a table of available suttas on each of the websites. To add all the translators to the interface would require keeping lots more information about what exists on SuttaCentral. And there is no mechanism for me to be informed when new ones are added. But I agree it would be a great feature.
You are absolutely correct that the app relies on SCās functionality of falling back to whatever translation exists. My thought with the app was giving people a quick way to get to a translation, not generating a perfect link. Thatās why I donāt default to the āAllā, aka SuttaPlex card. Because that would require an extra click to get to a translation. And there is only a very narrow selection of suttas (in the Vv and Pv) that wonāt redirect you to a translation because they donāt exist on SC.
Iāve tweaked the instructions (in the info tab) to make the behaviour a little more clear.
For the Ancient Buddhist Text website I do actually have full links stored to the pages because they are done in words not just citations that can be calculated like the other sites.
It didnāt make sense to me to keep track of the five different translators of the Jatakas when SC would be able to get you to the right place anyway.
One thought that I had was to not display the link as part of the button. Having it there made it easier to troubleshoot, but it may not make sense to show it to the user as it does seem like it may be promising something that doesnāt exist.
Thanks so much for the feedback! Itās really helpful.
No. I mean that it wasnāt clear that they were greyed out. To be fair, I was on my phone when I first tried it, so I was watching where to put my finger rather than what was happening in the UI.
I think even just a simple separator line (or different colour background for each) wouldāve helped me understand they were two different functions. Obviously now that I understand it, I see it as two separate functions.
And I really like that.
I like my interfaces to be explicit, but I see what you mean. Maybe having them say ānothing availableā is just cluttering it up.
Effectively theyāre buttons, so they could be greyed out (and empty) while nothing is available I guess? It would make the interface more consistent? Maybe?
And very handy that is too!
To be clear, it didnāt take me long to work out what was going on, and once I had it was fine. I was just monitoring and recording my confusion when first presented with the interface.
Itās a pleasure. I know how hard it is to get feedback on these things sometimes.
Oh, gosh, Iām thick. I didnāt realize that you had taken the time to make a real mockup so your label confused me. At some point I think I may have grayed the text out too, but obviously that wasnāt happening. Thanks so much. Thatās super helpful. Fixed now.
Iāll keep all your other comments in mind, especially as I try to integrate the Pali name lookup tool. Any thoughts on that?
This is a somewhat complex issue that Hongda is currently working on. We want to make it so that ārange suttasā (mainly dhp and the AN 1s and AN 2s, tho the concept could be extended further) can be accessed via different URLs. Normally on SC, of course, one URL = 1 resource. But in these cases there is no one, ānaturalā way to present the texts.
So the aim with Dhammapada would be that normal navigation remains as-is (via vagga). But you can also navigation to a single verse (/dhp123) or to the whole Dhammapada on a page, with the verse linked (/dhp#123). Itās a tricky one, because the concept of one sutta = one page is baked deeply into SC, and it affects a range of Page data. You can track progress here.
Thatās wonderful. A prerequisite for criticizing any sutta website should be that you have to try and make one first. The number of tricky bits is almost limitless. Thanks for all your hard work. And the whole team, of course.
Initial thoughts on Sutta name look up. It worked exactly as I thought it would. Itās fantastic!
I canāt imagine using the exact match, but itās good to have it there. I would prefer not to have to choose a language - my brain works in both English and āsloppyā (I mean fuzzy ) pali interchangeably, so āeitherā might be an additional language option?
As far as integration goes I havenāt really thought about itās feasibility, but one box that I can type whatever - number or name (incl regex) in whatever language, but also retain some āadvanced levelā for finer control. Would be awesome to have PTS lookup tool integrated in there too at some point?
I have a feeling that these tools are going to be hanging out in my open tabs pretty much constantly. Thanks once again for them!
This is awesome, Iāve used it every day since - reading alternate translations which I would likely not have otherwise accessed. I donāt read pali, but this is a very easy way to get another angle.
Anyway, some feedback on a quirk - itās not a problem for me, just an fyi. For a change, I thought to investigate a random Therigatha verse, Iāve heard of them but never read anyā¦didnāt even know where to find them(!). SuttaFriends > Theri > random verse took me to Thig11.1. Once Iād read it, as an experiment, into the main search box of Citation Helper I entered Thig11ā¦and the page goes completely blank. (repeatable, same behavior in Edge and Chrome).
Thanks again for providing this, sometimes just a few small words translated differently can open up a new understanding.
OK, should be fixed now. For anyone curious about why this was happeningā¦
Books are either a collection of suttas or a collection of chapters with suttas in them. And on the three websites the plugin really deals with (at least by calculating the urls programmatically) that is the limit to the levels, even though traditionally there may be more internal grouping.
There is one unusual case though, and thatās with the Thera and Therigatha. In those books there are a few chapters that, in effect, only have a single sutta. SuttaCentral and SuttaFriends deal with this by giving them the citation chapter.1. So for example, Thig11.1. But there is only one āsuttaā aka Theri in that chapter. However, on DhammaTalks.org, this is sutta has the citation Thig11.
Right now you can get all three links, but the script will only give you SC and SF if you put in Thag11.1. But along the way, when you type āThag11ā it will pop up DT. Not ideal, but at least now itās not broken!