sobjornstad / AnkiLPCG

Addon for dae/anki for studying lyrics and poetry
https://ankilpcg.readthedocs.io/en/latest/index.html
GNU General Public License v3.0
155 stars 22 forks source link

Have sublines for text with too long verses (Quran Memorization) #26

Closed emrergin closed 3 years ago

emrergin commented 3 years ago

Believe it or not this addon is used for Quran memorization.

Some of the verses of the Quran is really long for Ankifying. One way to use this addon then artificially cut the lines to have say 5 lines out of a single verse. This works, but it makes the task of automatically generating the cards much more tiring as you can imagine. It also messes up with verse ordering, and makes it easy to forget where does the actual verse is ending.

I and many "quranic aid" deck users would be really interested if there was a way to cut long lines into smaller ones naturally, so a reverse of line combining feature.

Thanks for all the effort! I did not know how to use Github before, hence my really late post.

sobjornstad commented 3 years ago

How would LPCG know where to break the lines? I'm not sure there is a general solution to this problem, if you want the lines to break in a logical spot. Presumably you would want the line to end at the same point as a phrase within the verse, but LPCG doesn't do language processing so it wouldn't be able to figure that out.

emrergin commented 3 years ago

Of course I don't expect the cuts to be dependent on the meaning. Word breaks will be enough. So something like 10 words per subline will work, as long as memorizer knows there is more to the sentence, I think.

sobjornstad commented 3 years ago

Of course I don't expect the cuts to be dependent on the meaning. Word breaks will be enough.

Yeah, I think the problem is that if the breaks are not dependent on meaning, the correct splitting behavior is highly context-dependent and the cards become harder to use:

It also messes up with verse ordering, and makes it easy to forget where does the actual verse is ending.

I'm not clear on how integrating this line-chopping is going to make this better. If anything, it seems to me like remembering where the verse ends would get worse under this method. And LPCG is still going to have to use a different sequence number for each generated note – otherwise you couldn't sort the text lines in order. So the numbers still will not end up matching the verse numbers (I'm assuming that's what you were going for?).

I guess the crux of it is that to me, joining lines is an operation that LPCG can always do correctly without compromising your ability to remember the text or making it harder to read, so it makes sense to integrate it. Splitting lines, on the other hand, is one that requires someone with an understanding of the text (i.e., not a computer program) to do in a sensitive manner that preserves the meaning. If I add this feature to LPCG, I don't see any way to avoid the splitting being done poorly, at least on occasion, and that's liable to create a lot of support requests for me and add a bunch of additional options to the interface that makes it harder for everyone else to use.

I also haven't seen anyone else ask for this before. If I start hearing from a bunch of people who also think this makes sense, and/or someone can present a general solution to the problems described above, I would reconsider.

If what you want is to mechanically split the lines so you don't have to do it yourself, what about using a simple tool like https://www.browserling.com/tools/word-wrap to do the breaking, and then pasting the result into LPCG?

emrergin commented 3 years ago

Fair points all around. I think the link you included also partially solves the issue I am suggesting. So thanks! :)

Quran memorizers generally don't know the meaning, so the memorization is usually a vocal one, hence the possibility of random chopping still working most of the time. Still, I admit that I may not have thought this through.