sobjornstad / AnkiLPCG

Addon for dae/anki for studying lyrics and poetry

Home Page:https://ankilpcg.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using LPCG to learn the translations of texts

sandersantema opened this issue · comments

LPCG doesn't seem to be made specifically for this use however seems to be the addon which would come the closest to supporting this.

Take for instance these three latin sentences with dutch translations:

Latin Dutch
Ille ego qui fuerim, tenerorum lusor amorum, Ik die zo bekend ben, wat voor iemand ik geweest ben, die speelse dichter van
quem legis, ut noris, accipe posteritas. tedere verliefdheden, die u leest, verneem [dat], nageslacht, opdat u het weet
Sulmo mihi patria est, gelidis uberrimus undis, Sulmo is mijn vaderland, zeer rijk aan koele stromen,

Wat I would like to see is some context lines in latin and for instance a card which asks about the translation of the second latin sentence with context lines before and after. Is there any way to do this? The addon almost seems to be able to do it but some features miss. Anyways thanks for the nice plugin @sobjornstad

Here's an idea that might address both this and another feature request I got recently. How about optional "before cloze" and "after cloze" fields that go with each line and are always displayed? So the templates would change as follows:

Current Front:

<div class="title">{{Title}} {{Sequence}}</div>

<br>

<div class="lines">
{{Context}}
<span class="cloze">[...]</span>
</div>

New Front:
To New Front:

<div class="title">{{Title}} {{Sequence}}</div>

<br>

<div class="lines">
{{Context}}
{{BeforeCloze}} <span class="cloze">{{Line}}</span> {{AfterCloze}}
</div>

Current Back:

<div class="title">{{Title}} {{Sequence}}</div>

<br>

<div class="lines">
{{Context}}
<span class="cloze">{{Line}}</span>
</div>

New Back:

<div class="title">{{Title}} {{Sequence}}</div>

<br>

<div class="lines">
{{Context}}
{{BeforeCloze}}<span class="cloze">{{Line}}</span>{{AfterCloze}}
</div>

I'm imagining something like the following syntax in the poem editor dialog (angle brackets seem rather unlikely to ever appear in poems):

Ille ego qui fuerim, tenerorum lusor amorum, >> Ik die zo bekend ben, wat voor iemand ik geweest ben, die speelse dichter van
quem legis, ut noris, accipe posteritas. >> tedere verliefdheden, die u leest, verneem [dat], nageslacht, opdat u het weet
Sulmo mihi patria est, gelidis uberrimus undis, >> Sulmo is mijn vaderland, zeer rijk aan koele stromen,

(For an "after cloze", you would use << instead on the right side.)

That would generate a front display something like this for the line 3 card:

Ille ego qui fuerim, tenerorum lusor amorum, Ik die zo bekend ben, wat voor iemand ik geweest ben, die speelse dichter van
quem legis, ut noris, accipe posteritas. tedere verliefdheden, die u leest, verneem [dat], nageslacht, opdat u het weet
Sulmo mihi patria est, gelidis uberrimus undis, [...]

In your case with two different languages, I expect you'd want to add some kind of horizontal space or | characters or something like that rather than having them run together as in my basic example :-). LPCG doesn't escape HTML placed in the poem editor, so you could insert any characters you like.

I am closing this because I have heard nothing more about it in several years. If others see a need for this and have a solution to offer -- the simpler the better -- please open a new issue and I'll reconsider.