adyeths / u2o

USFM to OSIS bible format converter.
The Unlicense
18 stars 6 forks source link

Add support for lemma #117

Closed LAfricain closed 9 months ago

LAfricain commented 1 year ago

Hi, It is possible that some bibles use the lemma marker. For example for an interlinear text. But during export this marker is ignored. Would it be possible to integrate it correctly into the output osis file? For example: If I have an usfm file like this: \w Βίβλος|strong="G976" lemma="Livre" x-morph="N-NFS"\w* I woul like an output like this: <w lemma="strong:G976 lemma:Livre" morph="robinson:N-NSF">Βίβλος</w>

Thank you!

adyeths commented 1 year ago

The lemma attribute should already be properly converted. The bug preventing it from being converted when strongs numbers were present has already been fixed.

LAfricain commented 1 year ago

Ok thank you, probably I don't have the last script. I try right now.

LAfricain commented 1 year ago

In fact the output usfm lemma="[This is the] record" is processed. But I have: <index index="Glossary" level1="[This is the] record" /> but to display the lemmas in xiphos for example, I would need either lemma="[This is the] record" or after strong lemma="strong:G976 lemma:[This is the] record"

adyeths commented 1 year ago

Should be fixed now.

LAfricain commented 1 year ago

I'm really sorry! I took as example tischendorfmorph.OSIS.xml, but this template seems wrong. lemma seems to be separated from strong. If not, it's displayed all the time in the gui. I'll investigate more and I'll come back, but the good way to write lemma seems to be: lemma="[This is the] record"

Edit: I don't understand anything, if we put the order as indicated above, only the last lemma is displayed, lemma="strong is not displayed. But if we keep the method as you gave it above both are displayed (strong and lemma) but we can no longer remove the display of the lemma. For the moment I need to ask for advice on the sword list. Edit2: I just took a look at the KJV, I saw that lemma is followed by a module name, so I put as in the KJV the name of the TR module after lemma, and it displays correctly. So, your fix seems good thank you very much!! I wait still a little bit before closing this issue.

DavidHaslam commented 1 year ago

@LAfricain

Can this issue now be closed?