adyeths / u2o

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

Bad conversion of \cp and \vp markers #93

Closed LAfricain closed 5 years ago

LAfricain commented 5 years ago

Hello, Currently I'm working on a Myanmar bible, as they use their own numbers, I have to work with the tag cp and vp, however the conversion to osis it seems to me that u2o should rather consider the tag \c and tag \v. Currently these tags are ignored, and it is the tages \cp and \vp that are used. Ex of text:

\c 4
\cp ၄
\p
\p
\v 1 \vp ၁။\vp* ထို့နောက်   ဝိညာဉ်တော်သည်   ယေဇူးကို  စာတန်နတ်ဆိုး၏နှောင့်ယှက်ခြင်း  ခံရစေရန် တောကန္တာရ သို့ခေါ်ဆောင်သွား တော်မူ၏။- 
\v 2 \vp ၂။\vp* ကိုယ်တော်သည်လည်း နေ့လေးဆယ်နှင့် ညလေးဆယ်ပတ်လုံး အစာရှောင် တော်မူပြီးနောက်  ဆာလောင်မွတ်သိပ်နေလေ၏။-  
\v 3 \vp ၃။\vp* ထိုအခါ နှောင့်ယှက်သောသူသည် အထံတော် သို့ချဉ်းကပ်၍ သင်သည် ဘုရား သခင်၏သားတော်မှန် လျှင် ဤကျောက်ခဲများကို ပေါင်မုန့်ဖြစ်စေရန် အမိန့်ရှိ တော်မူပါဟု ကိုယ်တော်အား လျှောက်လေ၏။-  
\v 4 \vp ၄။\vp* သို့ရာတွင်  ကိုယ်တော်က  လူသည်  အစားအစာအားဖြင့်သာ  အသက်ရှင် သည် မဟုတ်၊ ဘုရားသခင်၏နှုတ်တော် ထွက်စကားရှိ သမျှဖြင့်လည်း အသက်ရှင်ရကြောင်းကို ကျမ်းစာတော်မြတ်၌ ရေးထားသည်ဟု ဖြေကြားတော် မူ၏။
\v 5 \vp ၅။\vp* ထိုအခါ နတ်ဆိုးသည် ကိုယ်တော်အား သန့်ရှင်း သောမြို့တော်သို့ ခေါ်ဆောင်သွားပြီးလျှင် ဗိမာန်တော်၏အထွတ်၌ ထားလျက်၊- 

Result:

<chapter sID="Matt.၄" osisID="Matt.၄" n="၄" />
<verse eID="Matt.၄.၁၇။" />
</p>
<p>
<verse sID="Matt.၄.၁။" osisID="Matt.၄.၁။" n="၁။" />ထို့နောက် ဝိညာဉ်တော်သည် ယေဇူးကို စာတန်နတ်ဆိုး၏နှောင့်ယှက်ခြင်း ခံရစေရန် တောကန္တာရ သို့ခေါ်ဆောင်သွား တော်မူ၏။-
<verse eID="Matt.၄.၁။" />
<verse sID="Matt.၄.၂။" osisID="Matt.၄.၂။" n="၂။" />ကိုယ်တော်သည်လည်း နေ့လေးဆယ်နှင့် ညလေးဆယ်ပတ်လုံး အစာရှောင် တော်မူပြီးနောက် ဆာလောင်မွတ်သိပ်နေလေ၏။-
<verse eID="Matt.၄.၂။" />
<verse sID="Matt.၄.၃။" osisID="Matt.၄.၃။" n="၃။" />ထိုအခါ နှောင့်ယှက်သောသူသည် အထံတော် သို့ချဉ်းကပ်၍ သင်သည် ဘုရား သခင်၏သားတော်မှန် လျှင် ဤကျောက်ခဲများကို ပေါင်မုန့်ဖြစ်စေရန် အမိန့်ရှိ တော်မူပါဟု ကိုယ်တော်အား လျှောက်လေ၏။-
<verse eID="Matt.၄.၃။" />

Should not cp and vp be ignored? Thanks for help.

cmahte commented 5 years ago

I suggest this be a flag in the converter.

u2o -v=v to follow the marked verses (default) u2o -v=vp to follow the published verses. u20 -v=va to follow the alternate verses.

u2o -c=c to follow the marked chapter number. u20 -c=cp to follow the published chapter names. (note cp is usually non-numeric) u20 -c=ca to follow the alternate chapter names.

On Thu, Jul 25, 2019 at 2:01 AM LAfricain notifications@github.com wrote:

Hello, Currently I'm working on a Myanmar bible, as they use their own numbers, I have to work with the tag cp and vp, however the conversion to osis it seems to me that u2o should rather consider the tag \c and tag \v. Currently these tags are ignored, and it is the tages \cp and \vp that are used. Ex of text:

\c 4 \cp ၄ \p \p \v 1 \vp ၁။\vp ထို့နောက် ဝိညာဉ်တော်သည် ယေဇူးကို စာတန်နတ်ဆိုး၏နှောင့်ယှက်ခြင်း ခံရစေရန် တောကန္တာရ သို့ခေါ်ဆောင်သွား တော်မူ၏။- \v 2 \vp ၂။\vp ကိုယ်တော်သည်လည်း နေ့လေးဆယ်နှင့် ညလေးဆယ်ပတ်လုံး အစာရှောင် တော်မူပြီးနောက် ဆာလောင်မွတ်သိပ်နေလေ၏။- \v 3 \vp ၃။\vp ထိုအခါ နှောင့်ယှက်သောသူသည် အထံတော် သို့ချဉ်းကပ်၍ သင်သည် ဘုရား သခင်၏သားတော်မှန် လျှင် ဤကျောက်ခဲများကို ပေါင်မုန့်ဖြစ်စေရန် အမိန့်ရှိ တော်မူပါဟု ကိုယ်တော်အား လျှောက်လေ၏။- \v 4 \vp ၄။\vp သို့ရာတွင် ကိုယ်တော်က လူသည် အစားအစာအားဖြင့်သာ အသက်ရှင် သည် မဟုတ်၊ ဘုရားသခင်၏နှုတ်တော် ထွက်စကားရှိ သမျှဖြင့်လည်း အသက်ရှင်ရကြောင်းကို ကျမ်းစာတော်မြတ်၌ ရေးထားသည်ဟု ဖြေကြားတော် မူ၏။ \v 5 \vp ၅။\vp* ထိုအခါ နတ်ဆိုးသည် ကိုယ်တော်အား သန့်ရှင်း သောမြို့တော်သို့ ခေါ်ဆောင်သွားပြီးလျှင် ဗိမာန်တော်၏အထွတ်၌ ထားလျက်၊-

Result:

ထို့နောက် ဝိညာဉ်တော်သည် ယေဇူးကို စာတန်နတ်ဆိုး၏နှောင့်ယှက်ခြင်း ခံရစေရန် တောကန္တာရ သို့ခေါ်ဆောင်သွား တော်မူ၏။- ကိုယ်တော်သည်လည်း နေ့လေးဆယ်နှင့် ညလေးဆယ်ပတ်လုံး အစာရှောင် တော်မူပြီးနောက် ဆာလောင်မွတ်သိပ်နေလေ၏။- ထိုအခါ နှောင့်ယှက်သောသူသည် အထံတော် သို့ချဉ်းကပ်၍ သင်သည် ဘုရား သခင်၏သားတော်မှန် လျှင် ဤကျောက်ခဲများကို ပေါင်မုန့်ဖြစ်စေရန် အမိန့်ရှိ တော်မူပါဟု ကိုယ်တော်အား လျှောက်လေ၏။- Should not cp and vp be ignored? Thanks for help. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or mute the thread .

adyeths commented 5 years ago

u2o should now convert \cp and \vp tags to milestones like it does for \ca and \va tags. This is the best way I know how to handle these tags at this time when converting to osis.

LAfricain commented 5 years ago

u2o should now convert \cp and \vp tags to milestones like it does for \ca and \va tags

It is okay for me. Let me know if you propose a solution.

adyeths commented 5 years ago

I changed the handling of \cp and \vp tags again. I now put the value of them in the n attribute of the chapter and verse tags since that appears to be a better alternative than inserting them as separate milestone markers.

DavidHaslam commented 5 years ago

Does this test OK for a verse range?

LAfricain commented 5 years ago

Thank you very much, It works well.