diff --git a/demo.py b/demo.py index 02058a2..4afbfbe 100644 --- a/demo.py +++ b/demo.py @@ -4,6 +4,8 @@ #print(converter.toUnicode("ba b+ba [a] ba\\u0f0b")) orig = "ba b+ba [a] ba\\u0f0b" +orig = "snga 'phros a ri gzhung dang rgya gar gzhung so sor gsang ba'i thog nas nang don mthun lam chen po zhig nges par tu thugs zab thog/" + print(orig) warns = [] res = converter.toUnicode(orig, warns) @@ -18,3 +20,8 @@ print(converter.toWylie("In Chinese")) +#warns = [] +#print(converter.toUnicode("snga 'phros a ri gzhung dang rgya gar gzhung so sor gsang ba'i thog nas nang don mthun lam chen po zhig nges par tu thugs zab thog", warns)) + + +#print(converter.toUnicode("snga ", warns)) \ No newline at end of file diff --git a/pyewts/pyewts.py b/pyewts/pyewts.py index 3871909..9f9e1d6 100644 --- a/pyewts/pyewts.py +++ b/pyewts/pyewts.py @@ -960,7 +960,7 @@ def toUnicodeOneStack(self, tokens, i): t2 = tokens[i+1] if t2 != None and self.isSuperscript(t) and self.superscript(t, t2): if self.check_strict: - next = consonantString(tokens, i + 1) + next = self.consonantString(tokens, i + 1) if not self.superscript(t, next): next = next.replace("+", "") warns.append("Superscript \"" + t + "\" does not occur above combination \"" + next + "\".") @@ -1111,11 +1111,11 @@ def toUnicodeOneTsekbar(self, tokens, i): if not self.check: continue if state == self.State.PREFIX and stack.single_consonant != None: - consonants.add(stack.single_consonant) + consonants.append(stack.single_consonant) if self.isPrefix(stack.single_consonant): next = t if self.check_strict: - next = consonantString(tokens, i) + next = self.consonantString(tokens, i) if next != None and not self.prefix(stack.single_consonant, next): next = next.replace("+", "") warns.append("Prefix \"" + stack.single_consonant + "\" does not occur before \"" + next + "\".")