UAlbertaALTLab / crk-db

Managing the Plains Cree dictionary database
https://itwewina.altlab.app/
GNU General Public License v3.0
0 stars 3 forks source link

generate slug for each entry #40

Closed dwhieb closed 3 years ago

dwhieb commented 3 years ago

In some cases, itwêwina relies on search queries rather than URL parameters for routing. (I think this happens specifically with homographs?) It might be useful to generate a unique slug for each entry, allowing itwêwina to simplify routing-related code. Homographs would could get routed as /atim1 and /atim2, for example.

The slug could be the same as the key, or it could be the full headword with diacritics + a homograph number if needed.

dwhieb commented 3 years ago

@andrewdotn Do you remember the specific cases where itwêwina relies on query strings for routing?

@eddieantonio Would this be helpful for itwêwina? Any additional considerations?

eddieantonio commented 3 years ago

It's in the homograph disambiguator!

https://github.com/UAlbertaALTLab/cree-intelligent-dictionary/blob/8224633e03452b7058b8729619491ebcaf77068c/CreeDictionary/API/models.py#L107-L118

And yes, this would be would be very helpful!

We'd like a URL like /word/{headword}. Because of the paradigms, I think it'd be best if headwords that are associated with different inflectional categories (and thus pardigms) are given different disambiguations.

itwêwina should store headwords separate from ALL WORD FORMS, but it doesn't, so it needs a little help with, e.g., non-lemma wordforms that have their own definition(s):

Compare:

dwhieb commented 3 years ago

Closed by 457fe06b3a794b750089b628501a94b5418e083e.