A mini interface for the PED

A mini interface for the PED? Glad you asked.

ped.readingfaithfully.org

(You may recognize this from the DPPN tool I made. That’s because it’s exactly the same. But with a retro amber look instead of green.)

The dictionary file is 3mb transfer (15 on disk). I can’t figure out if it is being cached or not. According to this blogpost, it appears that Netlify uses instant cache invalidation. Until I get that all sorted out, be prepared to download 3mb each time you load the tool. Any help anyone can give me with this would be much appreciated.

Some problems. The instant search is set up to load when three characters are typed. This doesn’t work for shorter entries. For now you could use something like ^a$ if you knew the exact one or two letter word.

It’s also using a fuzzy search, which was great for DPPN. Probably not so much for this. I’m guessing that there should be a toggle for fuzzy and exact.

And the linked entries (like see xxx) don’t work. I’ll have to figure that out next.

Basically, this is just a work in progress.:grimacing: But I thought it was worth it to get feedback early. And we are scheduled for a power cut now, so I thought I would share.

Unlike the mini sutta interface, the data for this is not being pulled live from SC or github. So updates to the source file aren’t going to be added automatically.

Here is the github repo:

5 Likes

Love it!! :heart: Huzzah :fairy:

  • Perhaps it can go into “strict” mode automatically if it detects an accented character?
  • The links to SuttaCentral refs should probably use the new query parameters to open the Pāḷi up for you, since the whole point is to see the Pāḷi usage!
  • Maybe a link to some basic regex explainer for people who don’t know what that is?

You’re a wizard!

2 Likes

I wouldn’t bet that if I have one diacritical right I would remember the correct spelling of the entire word. Also, there are sometimes different spellings, and you don’t know which one the dictionary prefers. I’d personally prefer toggle.

2 Likes

Hmm. I get that. But I’m inclined to leave that up to the user. I’m guessing people who would be checking the Pali might have it defaulting to Pali-English anyway? Thoughts?

Yeah. A link will be good. But I’m betting that most people who would be able to use regex would already know. More helpful might be to include a small list of useful expressions. The most useful I think would be “starts with” since that’s what a dictionary usually is.

Any ideas what other common regex could be included? Since it’s just a dictionary search and not a canon search, I’m guessing that people wouldn’t need to do anything fancy.

Another question, Is there a need to be able to create a link to an entry in the app? Like, would you want to save it or share it with someone? I know that the front page of the NYTimes is 5gb, but sending someone a 3gb 3mb link for a single word somehow feels unkind.

Would there be a need for searching within the entries?

2 Likes

My Opinions (happy to hear others):

Not-me.jpeg

Most of the time I’m in “study the suttas” mode. But if I’m coming from the PED, I’m in “study the language” mode, if that makes sense…

Agreed! I suggested a link cause it would be easier for you, but yes some examples would be A+.

Yes. But not to share it. So that I can get a useful Back button! :slight_smile: Especially since I plan to click refs and then Back to the dictionary. target="_blank" on the links might work too… :thinking:

I assume you meant 3mb :joy:

Ideally yes, but not by default imo

Sure. But which layout should I set it to? line by line or side by side? Starting to sound like I’m going to be building an options dialog.

Are you not just doing that on your own manually because you are on a phone and it’s an extra step? But yes, being able to use the back button would be good.

Oh, no. That would be a disaster.

1 Like

I think I have the caching set up. So it should only be downloading the 3mb dictionary file once a month. I will probably adjust that later. If anyone is able to test that, that would be great.

I have also added a checkbox to toggle fuzzy searching. The setting is not stored across sessions yet. And it won’t re-filter the list when you check/uncheck it. Still working on that.

There is also a link icon that will take you to the entry in the dictionary in SuttaCentral. Not sure if it is the best interface, though.

Actually used this myself yesterday when I would have otherwise been lazy and misspelled a word. Fun when you get to use something you made!

2 Likes

This app doesn’t seem to be working for me today? I’ve tried a hard refresh.

1 Like

Everything should be working now. Including an improvement for clickable links to take you to cross references.

I’m curious to hear if the interface works well on mobile devices. I get a lag when typing sometimes.

I’m a bit confused by what * is doing in this case. It usually means “insert whatever here” but seems to be saying “the previous character is optional”? Especially mixing regex with fuzzy mode made me confuzzzzed :no_mouth:

1 Like

Right. So I guess it should say that regex is being used and not any of the various other wildcard systems you may be accustomed to.

I know that it’s common to see a checkbox for using regex. However that would seem to over-complicate things in this case. I’d have to implement a non-regex wildcard system.

Isn’t that universal regex? Not sure why that would be confusing.

Yeah, don’t do that. <hand smack emoji> Don’t drink and drive either. :grin:

I have updated the instructions. Tell me what you think.

Thanks for the feedback! Always appreciated even if I’m being snarky.

1 Like

This seems broken at the moment… :frowning:

Hmm. Works for me. What’s happening exactly?

The page loads, I search and then nothing happens. Maybe my slow internet. Let me try again and wait longer… [Edit: ah yes, now it loads. Nvm :smile: ]