transliteration icon indicating copy to clipboard operation
transliteration copied to clipboard

Not working for Thai

Open stephankn opened this issue 7 years ago • 6 comments

Completely broken for Thai.

Try เชียงใหม่

Should​ be Chiang Mai. Official scheme for Thai is RTGS.

Your transliteration looks as broken as ICU.

stephankn avatar May 04 '18 07:05 stephankn

You are right, Thai seems not supported. I'll add this in caveats section. Meanwhile, do you know any open source script which can transliterate Thai into Latin?

yf-hk avatar Jul 14 '18 12:07 yf-hk

Sorry, don't know anything better. I search from time for something RTGS capable. This is how I came across yours, just to discover it being broken as well. If someone finds open source capable of transliteration with RTGS I would be happy to learn about it, too.

stephankn avatar Jul 14 '18 14:07 stephankn

@stephankn I found one, it's not accurate but kind of working: https://github.com/comdevx/thai2karaoke Here is the test code:

const { thai2karaoke: thai } = require('thai2karaoke')();
const res = {
  status() {
    return this;
  },
  json(res) {
    console.log(res.data);
  }
}
let result = thai({ body: { text: 'เชียงใหม่' } },  res);
console.log(result);

Below are some links about the rules to transliterate Thai using RTGS: http://www.arts.chula.ac.th/~ling/tts/principles_eng.pdf https://en.wikipedia.org/wiki/Royal_Thai_General_System_of_Transcription

I'm not quite familiar with Thai, if any one can help coding the conversion rules, I can merge it into this module. Here is a place where you can test whether the result is correct: http://www.thai-language.com/?nav=dictionary&anyxlit=1

yf-hk avatar Jul 15 '18 20:07 yf-hk

Another service for testing transliteration https://www.thai2english.com/transliteration

arturtr avatar Dec 05 '18 05:12 arturtr

Meanwhile I found this one to work quite well for Thai: https://pypi.org/project/tltk/

stephankn avatar Sep 28 '19 17:09 stephankn