jzohrab / lute

DEPRECATED: LUTE (Learning Using Texts) is a self-hosted web app for learning language through reading, based on Learning with Texts (LWT)
The Unlicense
119 stars 10 forks source link

Sentences are missing for archived texts, which messes up references. #30

Closed jzohrab closed 1 year ago

jzohrab commented 1 year ago

While reading today, I had a word showing up as "known", but I couldn't find a reference for it (when I clicked "sentences"). Turns out a book had been archived, and the sentences had been removed. This is probably a relic of prior code that used to wipe sentences.

This will likely be an expensive operation (will have to re-parse any texts that don't have sentences), so maybe have a special section for one-time jobs, and only show this if there are texts that don't have sentences.

Will this blow up the size of the DB?

jzohrab commented 1 year ago

Yes, this will make the DB large. A few options:

jzohrab commented 1 year ago

Not fixing this -- it's a bug due to old code, life moves on, and things get better. We hope. Anyway, the way that text is stored/parsed needs to be revamped a bit, I think, as the db currently contains stuff that it really doesn't need (eg. texts.TxText seems redundant, when we have the Sentences table).