OpenPecha / pyewts

Tibetan Unicode to Wylie converter. (EWTS-Extended Wylie Transliteration Scheme)
Apache License 2.0
21 stars 3 forks source link

minor bugs. #2

Closed riggy2013 closed 5 years ago

riggy2013 commented 5 years ago

minor bugs, syntax error w/ new demo.py consonantString => self.consonantString consonants.add => consonants.append

eroux commented 5 years ago

thanks a lot!

eroux commented 5 years ago

the warning printed in the demo now contain some weird data, ex:

'line 1: "snga": Superscript "s" does not occur above combination "".

the final string of the warning shouldn't be empty (it should be "nga")... I'll try to take a look this week-end (if you don't have time before)

riggy2013 commented 5 years ago

Elie,

I am checking it too.

The input is correct.

snga 'phros or སྣྔྔ་འཕྲྲོས་ means temporarily.

The error seems in check_strict. What do you want to get from check_strict?

if t2 != None and self.isSuperscript(t) and self.superscript(t, t2): if self.check_strict: next = self.consonantString(tokens, i + 1) if not self.superscript(t, next): next = next.replace("+", "") warns.append("Superscript \"" + t + "\" does not occur above combination \""

if I understand correctly, you want to add next consonant and try to check superscript like ""k+y","g+y","m+y","b+w","ts+w","g+w"". Two issues here:

  1. if next consonantString is empty, you should ignore the check. This is what happening w/ "snag".
  2. if there is indeed next consonantString, it seems you should append it to t2 and do check.

Thanks,

David Peng

On Wed, Jun 12, 2019 at 4:45 PM Elie Roux notifications@github.com wrote:

the warning printed in the demo now contain some weird data, ex:

'line 1: "snga": Superscript "s" does not occur above combination "".

the final string of the warning shouldn't be empty (it should be "nga")... I'll try to take a look this week-end (if you don't have time before)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esukhia/pyewts/pull/2?email_source=notifications&email_token=ABD5ROKPQGJX3JXGEHHQ5BDP2CZRFA5CNFSM4HW643CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPWEFY#issuecomment-501178903, or mute the thread https://github.com/notifications/unsubscribe-auth/ABD5ROMBATFEQAN6MFGO7K3P2CZRFANCNFSM4HW643CA .

eroux commented 5 years ago

ok, I think I've fixed the problem... can you give it a try? BTW, thanks a lot for your help! People interested in Tibetan are rare, may I ask you on what kind of projects you will be using pyewts?